Search Results for

    Show / Hide Table of Contents

    Class PointPairList

    A collection class containing a list of PointPair objects that define the set of points to be displayed on the curve.

    Inheritance
    Object
    List<PointPair>
    PointPairList
    Implements
    IList<PointPair>
    ICollection<PointPair>
    IEnumerable<PointPair>
    IList
    ICollection
    IEnumerable
    IPointListEdit
    IPointList
    ICloneable
    Inherited Members
    System.Collections.Generic.List<ZedGraph.PointPair>.System.Collections.IList.get_Item(System.Int32)
    System.Collections.Generic.List<ZedGraph.PointPair>.System.Collections.IList.set_Item(System.Int32, System.Object)
    List<PointPair>.AddRange(IEnumerable<PointPair>)
    List<PointPair>.AsReadOnly()
    List<PointPair>.BinarySearch(Int32, Int32, PointPair, IComparer<PointPair>)
    List<PointPair>.BinarySearch(PointPair)
    List<PointPair>.BinarySearch(PointPair, IComparer<PointPair>)
    List<PointPair>.Clear()
    List<PointPair>.Contains(PointPair)
    List<PointPair>.ConvertAll<TOutput>(Converter<PointPair, TOutput>)
    List<PointPair>.CopyTo(Int32, PointPair[], Int32, Int32)
    List<PointPair>.CopyTo(PointPair[])
    List<PointPair>.CopyTo(PointPair[], Int32)
    List<PointPair>.Exists(Predicate<PointPair>)
    List<PointPair>.Find(Predicate<PointPair>)
    List<PointPair>.FindAll(Predicate<PointPair>)
    List<PointPair>.FindIndex(Int32, Int32, Predicate<PointPair>)
    List<PointPair>.FindIndex(Int32, Predicate<PointPair>)
    List<PointPair>.FindIndex(Predicate<PointPair>)
    List<PointPair>.FindLast(Predicate<PointPair>)
    List<PointPair>.FindLastIndex(Int32, Int32, Predicate<PointPair>)
    List<PointPair>.FindLastIndex(Int32, Predicate<PointPair>)
    List<PointPair>.FindLastIndex(Predicate<PointPair>)
    List<PointPair>.ForEach(Action<PointPair>)
    List<PointPair>.GetEnumerator()
    List<PointPair>.GetRange(Int32, Int32)
    List<PointPair>.IndexOf(PointPair)
    List<PointPair>.IndexOf(PointPair, Int32)
    List<PointPair>.IndexOf(PointPair, Int32, Int32)
    List<PointPair>.InsertRange(Int32, IEnumerable<PointPair>)
    List<PointPair>.LastIndexOf(PointPair)
    List<PointPair>.LastIndexOf(PointPair, Int32)
    List<PointPair>.LastIndexOf(PointPair, Int32, Int32)
    List<PointPair>.Remove(PointPair)
    List<PointPair>.RemoveAll(Predicate<PointPair>)
    List<PointPair>.RemoveAt(Int32)
    List<PointPair>.RemoveRange(Int32, Int32)
    List<PointPair>.Reverse()
    List<PointPair>.Reverse(Int32, Int32)
    List<PointPair>.Sort(IComparer<PointPair>)
    List<PointPair>.Sort(Comparison<PointPair>)
    List<PointPair>.Sort(Int32, Int32, IComparer<PointPair>)
    List<PointPair>.IEnumerable<PointPair>.GetEnumerator()
    List<PointPair>.ICollection.CopyTo(Array, Int32)
    List<PointPair>.IEnumerable.GetEnumerator()
    List<PointPair>.IList.Add(Object)
    List<PointPair>.IList.Contains(Object)
    List<PointPair>.IList.IndexOf(Object)
    List<PointPair>.IList.Insert(Int32, Object)
    List<PointPair>.IList.Remove(Object)
    List<PointPair>.ToArray()
    List<PointPair>.TrimExcess()
    List<PointPair>.TrueForAll(Predicate<PointPair>)
    List<PointPair>.Capacity
    List<PointPair>.Count
    List<PointPair>.Item[Int32]
    List<PointPair>.ICollection<PointPair>.IsReadOnly
    List<PointPair>.ICollection.IsSynchronized
    List<PointPair>.ICollection.SyncRoot
    List<PointPair>.IList.IsFixedSize
    List<PointPair>.IList.IsReadOnly
    List<PointPair>.IList.Item[Int32]
    Object.Equals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: ZedGraph
    Assembly: ZedGraph.dll
    Syntax
    [Serializable]
    public class PointPairList : List<PointPair>, IList<PointPair>, ICollection<PointPair>, IEnumerable<PointPair>, IList, ICollection, IEnumerable, IPointListEdit, IPointList, ICloneable

    Constructors

    | Improve this Doc View Source

    PointPairList()

    Default constructor for the collection class

    Declaration
    public PointPairList()
    | Improve this Doc View Source

    PointPairList(Double[], Double[])

    Constructor to initialize the PointPairList from two arrays of type double.

    Declaration
    public PointPairList(double[] x, double[] y)
    Parameters
    Type Name Description
    Double[] x
    Double[] y
    | Improve this Doc View Source

    PointPairList(Double[], Double[], Double[])

    Constructor to initialize the PointPairList from three arrays of type double.

    Declaration
    public PointPairList(double[] x, double[] y, double[] baseVal)
    Parameters
    Type Name Description
    Double[] x
    Double[] y
    Double[] baseVal
    | Improve this Doc View Source

    PointPairList(IPointList)

    Constructor to initialize the PointPairList from an IPointList

    Declaration
    public PointPairList(IPointList list)
    Parameters
    Type Name Description
    IPointList list
    | Improve this Doc View Source

    PointPairList(PointPairList)

    The Copy Constructor

    Declaration
    public PointPairList(PointPairList rhs)
    Parameters
    Type Name Description
    PointPairList rhs

    The PointPairList from which to copy

    Fields

    | Improve this Doc View Source

    _sorted

    Private field to maintain the sort status of this PointPairList. Use the public property Sorted to access this value.

    Declaration
    [CLSCompliant(false)]
    protected bool _sorted
    Field Value
    Type Description
    Boolean

    Properties

    | Improve this Doc View Source

    Sorted

    true if the list is currently sorted.

    Declaration
    public bool Sorted { get; }
    Property Value
    Type Description
    Boolean
    See Also
    Sort()

    Methods

    | Improve this Doc View Source

    Add(Double, Double)

    Add a single point to the PointPairList from values of type double.

    Declaration
    public void Add(double x, double y)
    Parameters
    Type Name Description
    Double x

    The X value

    Double y

    The Y value

    | Improve this Doc View Source

    Add(Double, Double, Double)

    Add a single point to the PointPairList from values of type double.

    Declaration
    public void Add(double x, double y, double z)
    Parameters
    Type Name Description
    Double x

    The X value

    Double y

    The Y value

    Double z

    The Z or lower dependent axis value

    | Improve this Doc View Source

    Add(Double, Double, Double, String)

    Add a single point to the PointPairList from values of type double.

    Declaration
    public void Add(double x, double y, double z, string tag)
    Parameters
    Type Name Description
    Double x

    The X value

    Double y

    The Y value

    Double z

    The Z or lower dependent axis value

    String tag

    The Tag value for the PointPair

    | Improve this Doc View Source

    Add(Double, Double, String)

    Add a single point to the PointPairList from values of type double.

    Declaration
    public void Add(double x, double y, string tag)
    Parameters
    Type Name Description
    Double x

    The X value

    Double y

    The Y value

    String tag

    The Tag value for the PointPair

    | Improve this Doc View Source

    Add(Double[], Double[])

    Add a set of points to the PointPairList from two arrays of type double. If either array is null, then a set of ordinal values is automatically generated in its place (see Ordinal. If the arrays are of different size, then the larger array prevails and the smaller array is padded with Missing values.

    Declaration
    public void Add(double[] x, double[] y)
    Parameters
    Type Name Description
    Double[] x

    A double[] array of X values

    Double[] y

    A double[] array of Y values

    | Improve this Doc View Source

    Add(Double[], Double[], Double[])

    Add a set of points to the PointPairList from three arrays of type double. If the X or Y array is null, then a set of ordinal values is automatically generated in its place (see Ordinal. If the is null, then it is set to zero. If the arrays are of different size, then the larger array prevails and the smaller array is padded with Missing values.

    Declaration
    public void Add(double[] x, double[] y, double[] z)
    Parameters
    Type Name Description
    Double[] x

    A double[] array of X values

    Double[] y

    A double[] array of Y values

    Double[] z

    A double[] array of Z or lower-dependent axis values

    | Improve this Doc View Source

    Add(PointPair)

    Add a PointPair object to the collection at the end of the list.

    Declaration
    public void Add(PointPair point)
    Parameters
    Type Name Description
    PointPair point

    The PointPair object to be added

    | Improve this Doc View Source

    Add(PointPairList)

    Add a PointPairList object to the collection at the end of the list.

    Declaration
    public void Add(PointPairList pointList)
    Parameters
    Type Name Description
    PointPairList pointList

    A reference to the PointPairList object to be added

    | Improve this Doc View Source

    Clone()

    Typesafe, deep-copy clone method.

    Declaration
    public PointPairList Clone()
    Returns
    Type Description
    PointPairList

    A new, independent copy of this class

    | Improve this Doc View Source

    Equals(Object)

    Compare two PointPairList objects to see if they are equal.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    The PointPairList to be compared with for equality.

    Returns
    Type Description
    Boolean

    true if the PointPairList objects are equal, false otherwise.

    Overrides
    Object.Equals(Object)
    Remarks

    Equality is based on equal count of PointPair items, and each individual PointPair must be equal (as per the Equals(Object) method.

    | Improve this Doc View Source

    GetHashCode()

    Return the HashCode from the base class.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    Object.GetHashCode()
    | Improve this Doc View Source

    IndexOfTag(String)

    Return the zero-based position index of the PointPair with the specified label Tag.

    Declaration
    public int IndexOfTag(string label)
    Parameters
    Type Name Description
    String label

    The String label that is in the Tag attribute of the item to be found.

    Returns
    Type Description
    Int32

    The zero-based index of the specified PointPair, or -1 if the PointPair is not in the list

    Remarks

    The Tag object must be of type String for this method to find it.

    | Improve this Doc View Source

    Insert(Int32, Double, Double)

    Add a single point (from values of type double ) to the PointPairList at the specified, zero-based, index location.

    Declaration
    public void Insert(int index, double x, double y)
    Parameters
    Type Name Description
    Int32 index

    The zero-based ordinal index where the point is to be added in the list.

    Double x

    The X value

    Double y

    The Y value

    | Improve this Doc View Source

    Insert(Int32, Double, Double, Double)

    Add a single point (from values of type double ) to the PointPairList at the specified, zero-based, index location.

    Declaration
    public void Insert(int index, double x, double y, double z)
    Parameters
    Type Name Description
    Int32 index

    The zero-based ordinal index where the point is to be added in the list.

    Double x

    The X value

    Double y

    The Y value

    Double z

    The Z or lower dependent axis value

    | Improve this Doc View Source

    Insert(Int32, PointPair)

    Add a PointPair object to the collection at the specified, zero-based, index location.

    Declaration
    public void Insert(int index, PointPair point)
    Parameters
    Type Name Description
    Int32 index

    The zero-based ordinal index where the point is to be added in the list.

    PointPair point

    The PointPair object to be added.

    | Improve this Doc View Source

    InterpolateX(Double)

    Linearly interpolate the data to find an arbitraty Y value that corresponds to the specified X value.

    Declaration
    public double InterpolateX(double xTarget)
    Parameters
    Type Name Description
    Double xTarget

    The target X value on which to interpolate

    Returns
    Type Description
    Double

    The Y value that corresponds to the value.

    Remarks

    This method uses linear interpolation with a binary search algorithm. It therefore requires that the x data be monotonically increasing. Missing values are not allowed. This method will extrapolate outside the range of the PointPairList if necessary.

    | Improve this Doc View Source

    InterpolateY(Double)

    Linearly interpolate the data to find an arbitraty X value that corresponds to the specified Y value.

    Declaration
    public double InterpolateY(double yTarget)
    Parameters
    Type Name Description
    Double yTarget

    The target Y value on which to interpolate

    Returns
    Type Description
    Double

    The X value that corresponds to the value.

    Remarks

    This method uses linear interpolation with a binary search algorithm. It therefore requires that the Y data be monotonically increasing. Missing values are not allowed. This method will extrapolate outside the range of the PointPairList if necessary.

    | Improve this Doc View Source

    LinearRegression(IPointList, Int32)

    Use linear regression to form a least squares fit of an existing IPointList instance.

    Declaration
    public PointPairList LinearRegression(IPointList points, int pointCount)
    Parameters
    Type Name Description
    IPointList points

    An IPointList instance containing the data to be regressed.

    Int32 pointCount

    The number of desired points to be included in the resultant PointPairList.

    Returns
    Type Description
    PointPairList

    A new PointPairList containing the resultant data fit.

    Remarks

    The output PointPairList will cover the same X range of data as the original dataset.

    | Improve this Doc View Source

    LinearRegression(IPointList, Int32, Double, Double)

    Use linear regression to form a least squares fit of an existing IPointList instance.

    Declaration
    public PointPairList LinearRegression(IPointList points, int pointCount, double minX, double maxX)
    Parameters
    Type Name Description
    IPointList points

    An IPointList instance containing the data to be regressed.

    Int32 pointCount

    The number of desired points to be included in the resultant PointPairList.

    Double minX

    The minimum X value of the resultant PointPairList.

    Double maxX

    The maximum X value of the resultant PointPairList.

    Returns
    Type Description
    PointPairList

    A new PointPairList containing the resultant data fit.

    | Improve this Doc View Source

    SetX(Double[])

    Set the X values for this PointPairList from the specified array of double values.

    Declaration
    public void SetX(double[] x)
    Parameters
    Type Name Description
    Double[] x

    An array of double values that will replace the existing X values in the PointPairList.

    Remarks

    If has more values than this list, then the extra values will be ignored. If has less values, then the corresponding PointPairList values will not be changed. That is, if the PointPairList has 20 values and has 15 values, then the first 15 values of the PointPairList will be changed, and the last 5 values will not be changed.

    | Improve this Doc View Source

    SetY(Double[])

    Set the Y values for this PointPairList from the specified array of double values.

    Declaration
    public void SetY(double[] y)
    Parameters
    Type Name Description
    Double[] y

    An array of double values that will replace the existing Y values in the PointPairList.

    Remarks

    If has more values than this list, then the extra values will be ignored. If has less values, then the corresponding PointPairList values will not be changed. That is, if the PointPairList has 20 values and has 15 values, then the first 15 values of the PointPairList will be changed, and the last 5 values will not be changed.

    | Improve this Doc View Source

    SetZ(Double[])

    Set the Z values for this PointPairList from the specified array of double values.

    Declaration
    public void SetZ(double[] z)
    Parameters
    Type Name Description
    Double[] z

    An array of double values that will replace the existing Z values in the PointPairList.

    Remarks

    If has more values than this list, then the extra values will be ignored. If has less values, then the corresponding PointPairList values will not be changed. That is, if the PointPairList has 20 values and has 15 values, then the first 15 values of the PointPairList will be changed, and the last 5 values will not be changed.

    | Improve this Doc View Source

    Sort()

    Sorts the list according to the point x values. Will not sort the list if the list is already sorted.

    Declaration
    public bool Sort()
    Returns
    Type Description
    Boolean

    If the list was sorted before sort was called

    | Improve this Doc View Source

    Sort(SortType)

    Sorts the list according to the point values . Will not sort the list if the list is already sorted.

    Declaration
    public bool Sort(SortType type)
    Parameters
    Type Name Description
    SortType type
    Returns
    Type Description
    Boolean

    If the list was sorted before sort was called

    | Improve this Doc View Source

    SplineInterpolateX(Double, Double)

    Use Cardinal Splines to Interpolate the data to find an arbitraty Y value that corresponds to the specified X value.

    Declaration
    public double SplineInterpolateX(double xTarget, double tension)
    Parameters
    Type Name Description
    Double xTarget

    The target X value on which to interpolate

    Double tension

    The tension setting that controls the curvature of the spline fit. Typical values are between 0 and 1, where 0 is a linear fit, and 1 is lots of "roundness". Values greater than 1 may give odd results.

    Returns
    Type Description
    Double

    The Y value that corresponds to the value.

    Remarks

    This method uses cardinal spline interpolation with a binary search algorithm. It therefore requires that the x data be monotonically increasing. Missing values are not allowed. This method will not extrapolate outside the range of the PointPairList (it returns Missing if extrapolation would be required). WARNING: Cardinal spline interpolation can generate curves with non-unique X values for higher tension settings. That is, there may be multiple X values for the same Y value. This routine follows the path of the spline curve until it reaches the FIRST OCCURRENCE of the target X value. It does not check to see if other solutions are possible.

    | Improve this Doc View Source

    SumX(PointPairList)

    Add the X values from the specified PointPairList object to this PointPairList. If has more values than this list, then the extra values will be ignored. If has less values, the missing values are assumed to be zero.

    Declaration
    public void SumX(PointPairList sumList)
    Parameters
    Type Name Description
    PointPairList sumList

    A reference to the PointPairList object to be summed into the this PointPairList.

    | Improve this Doc View Source

    SumY(PointPairList)

    Add the Y values from the specified PointPairList object to this PointPairList. If has more values than this list, then the extra values will be ignored. If has less values, the missing values are assumed to be zero.

    Declaration
    public void SumY(PointPairList sumList)
    Parameters
    Type Name Description
    PointPairList sumList

    A reference to the PointPairList object to be summed into the this PointPairList.

    Explicit Interface Implementations

    | Improve this Doc View Source

    ICloneable.Clone()

    Implement the ICloneable interface in a typesafe manner by just calling the typed version of Clone()

    Declaration
    object ICloneable.Clone()
    Returns
    Type Description
    Object

    A deep copy of this object

    Implements

    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable
    IPointListEdit
    IPointList
    System.ICloneable

    See Also

    BasicArrayPointList
    IPointList
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX