Esempio n. 1
0
 /// <summary>Creates a new <c>LabelMatrix&lt;double,double&gt;</c> object.
 /// </summary>
 /// <param name="rowCount">The number of rows.</param>
 /// <param name="columnCount">The number of columns.</param>
 /// <param name="data">The data, i.e. the grid points provided column-by-column. <see cref="System.Double.NaN"/> entries are allowed.</param>
 /// <param name="horizontalLabels">The horizontal labels.</param>
 /// <param name="verticalLabels">The vertical labels.</param>
 /// <param name="missingValueReplenishment">The missing value replenishment; if <c>null</c> and if <paramref name="data"/> contains missing
 /// values it cannot be ensured that the surface is well-defined for each point (depends on interpolation/extrapolation etc. and on the location of missing values).</param>
 /// <param name="orderOfInput">A value indicating whether the input, i.e. the <see cref="System.Double"/> representation of the labels are in ascending order.</param>
 /// <param name="UpperLeftCornerLabel">The label in the 'upper left corner', i.e. some optional additional header label.</param>
 /// <returns>An object that represents a matrix with some additional horizontal and vertical header.</returns>
 /// <remarks>No missing value replenishment will take place.</remarks>
 public static LabelMatrix <double, double> Create(int rowCount, int columnCount, IList <double> data, IList <double> horizontalLabels, IList <double> verticalLabels, MissingValueReplenishment missingValueReplenishment = null, OrderOfInput orderOfInput = OrderOfInput.AscendingOrder, string UpperLeftCornerLabel = "")
 {
     if (missingValueReplenishment != null)
     {
         return(new LabelMatrix <double, double>(rowCount, columnCount, data, horizontalLabels, horizontalLabels, verticalLabels, verticalLabels, missingValueReplenishment.Create(), orderOfInput, UpperLeftCornerLabel));
     }
     return(new LabelMatrix <double, double>(rowCount, columnCount, data, horizontalLabels, horizontalLabels, verticalLabels, verticalLabels, orderOfInput: orderOfInput, upperLeftCornerLabel: UpperLeftCornerLabel));
 }
Esempio n. 2
0
 /// <summary>Creates a new <see cref="LabelMatrix&lt;THorizontalLabel,TVerticalLabel&gt;"/> object.
 /// </summary>
 /// <typeparam name="THorizontalLabel">The type of the horizontal label.</typeparam>
 /// <typeparam name="TVerticalLabel">The type of the vertical label.</typeparam>
 /// <param name="rowCount">The number of rows.</param>
 /// <param name="columnCount">The number of columns.</param>
 /// <param name="data">The data, i.e. the grid points provided column-by-column. <see cref="System.Double.NaN"/> entries are allowed.</param>
 /// <param name="horizontalLabels">The horizontal labels.</param>
 /// <param name="horizontalDoubleLabels">The horizontal labels in its <see cref="System.Double"/> representation.</param>
 /// <param name="verticalLabels">The vertical labels.</param>
 /// <param name="verticalDoubleLabels">The vertical labels in its <see cref="System.Double"/> representation.</param>
 /// <param name="missingValueReplenishment">The missing value replenishment; if <c>null</c> and if <paramref name="data"/> contains missing
 /// values it cannot be ensured that the surface is well-defined for each point (depends on interpolation/extrapolation etc. and on the location of missing values).</param>
 /// <param name="orderOfInput">A value indicating whether the input, i.e. the <see cref="System.Double"/> representation of the labels are in ascending order.</param>
 /// <param name="UpperLeftCornerLabel">The label in the 'upper left corner', i.e. some optional additional header label.</param>
 /// <returns>An object that represents a matrix with some additional horizontal and vertical header.</returns>
 /// <remarks>No missing value replenishment will take place.</remarks>
 public static LabelMatrix <THorizontalLabel, TVerticalLabel> Create <THorizontalLabel, TVerticalLabel>(int rowCount, int columnCount, IList <double> data, IList <THorizontalLabel> horizontalLabels, IList <double> horizontalDoubleLabels, IList <TVerticalLabel> verticalLabels, IList <double> verticalDoubleLabels, MissingValueReplenishment missingValueReplenishment = null, OrderOfInput orderOfInput = OrderOfInput.AscendingOrder, string UpperLeftCornerLabel = "")
     where THorizontalLabel : IComparable <THorizontalLabel>
     where TVerticalLabel : IComparable <TVerticalLabel>
 {
     if (missingValueReplenishment != null)
     {
         return(new LabelMatrix <THorizontalLabel, TVerticalLabel>(rowCount, columnCount, data, horizontalLabels, horizontalDoubleLabels, verticalLabels, verticalDoubleLabels, missingValueReplenishment.Create(), orderOfInput, UpperLeftCornerLabel));
     }
     else
     {
         return(new LabelMatrix <THorizontalLabel, TVerticalLabel>(rowCount, columnCount, data, horizontalLabels, horizontalDoubleLabels, verticalLabels, verticalDoubleLabels, orderOfInput: orderOfInput, upperLeftCornerLabel: UpperLeftCornerLabel));
     }
 }