/// <summary> /// Creates a histogram dimension. If partitionFunc is null then DoPartition must be /// overriden in the derived class /// </summary> /// <param name="desc">Description of dimension used in reporting</param> /// <param name="partCount">Total number of partitions</param> /// <param name="partitionFunc">Used to inject a function in order not to override this class</param> /// <param name="partitionNameFunc">Used to inject a function in order not to override this class</param> public TimeDimension( string desc, int partCount = DEFAULT_PART_COUNT, PartitionFunc <double> partitionFunc = null, PartitionNameFunc partitionNameFunc = null) : base(desc, partCount, partitionFunc, partitionNameFunc) { }
public TimeHistogram( string title, string dim1Name, int dim1PartCount, PartitionFunc <double> dim1PartitionFunc = null, PartitionNameFunc dim1PartitionNameFunc = null) { m_Hist = new Histogram <double>(title, new TimeDimension( dim1Name, dim1PartCount, dim1PartitionFunc, dim1PartitionNameFunc)); }
public TimeHistogram( string title, string dim1Name, PartitionFunc <double> dim1PartitionFunc = null, PartitionNameFunc dim1PartitionNameFunc = null) { m_Hist = new Histogram <double>(title, new TimeDimension( dim1Name, TimeDimension.DEFAULT_PART_COUNT, dim1PartitionFunc, dim1PartitionNameFunc)); }
public TimeHistogram( string title, string dim1Name, int dim1PartCount, PartitionFunc <double> dim1PartitionFunc, Dimension <TData2> dimension2) { m_Hist = new Histogram <double, TData2>(title, new TimeDimension(dim1Name, dim1PartCount, dim1PartitionFunc), dimension2); }
public TimeHistogram( string title, string dim1Name, int dim1PartCount, PartitionFunc<double> dim1PartitionFunc = null, PartitionNameFunc dim1PartitionNameFunc = null) { m_Hist = new Histogram<double>(title, new TimeDimension( dim1Name, dim1PartCount, dim1PartitionFunc, dim1PartitionNameFunc)); }
public TimeHistogram( string title, string dim1Name, PartitionFunc<double> dim1PartitionFunc = null, PartitionNameFunc dim1PartitionNameFunc = null) { m_Hist = new Histogram<double>(title, new TimeDimension( dim1Name, TimeDimension.DEFAULT_PART_COUNT, dim1PartitionFunc, dim1PartitionNameFunc)); }
/// <summary> /// Initializes a new <see cref="MarkovChainMapBuilder{T}"/> instance with specified depth, and aggregation and /// partition functions. /// </summary> /// <param name="depth">Depth of the <see cref="MarkovChainMap{T}"/> to build.</param> /// <param name="partition"><see cref="PartitionFunc{T}"/> which will be used to build the /// <see cref="MarkovChainMap{T}"/>.</param> /// <param name="aggregate"><see cref="AggregationFunc{T}"/> which will be used to build the /// <see cref="MarkovChainMap{T}"/>.</param> /// <exception cref="ArgumentException"><paramref name="depth"/> is less than one.</exception> /// <exception cref="ArgumentNullException"><paramref name="partition"/> is null, or <paramref name="aggregate"/> /// is null.</exception> public MarkovChainMapBuilder(int depth, PartitionFunc <T> partition, AggregationFunc <T> aggregate) { if (depth < 1) { throw new ArgumentException(nameof(depth)); } if (partition == null) { throw new ArgumentNullException(nameof(partition)); } if (aggregate == null) { throw new ArgumentNullException(nameof(aggregate)); } _depth = depth; _partition = partition; _aggregate = aggregate; }
/// <summary> /// Initializes a new <see cref="MarkovChainStringMapBuilder"/> with specified depth and whitespace-skipping mode, /// as well as <see cref="PartitionFunc{T}"/> and <see cref="AggregationFunc{T}"/> functions for string type. /// </summary> /// <param name="depth">Depth of the <see cref="MarkovChainMap{T}"/> to build.</param> /// <param name="partition"><see cref="PartitionFunc{T}"/> which will be used to build the /// <see cref="MarkovChainMap{T}"/>.</param> /// <param name="aggregate"><see cref="AggregationFunc{T}"/> which will be used to build the /// <see cref="MarkovChainMap{T}"/>.</param> /// <param name="skipWhitespace">Whether or not white spaces should be considered while building maps. When set to /// true, individual samples will be split when containing white space(s). When set to false, white spaces will /// not be ignored, and thus will appear as valid states in the resulting map.</param> /// <exception cref="ArgumentException"><paramref name="depth"/> is less than one.</exception> /// <exception cref="ArgumentNullException"><paramref name="partition"/> is null, or <paramref name="aggregate"/> /// is null.</exception> public MarkovChainStringMapBuilder(int depth, PartitionFunc <string> partition, AggregationFunc <string> aggregate, bool skipWhitespace = true) : base(depth, partition, aggregate) { _skipWhitespace = skipWhitespace; }