Package space.kscience.kmath.histogram

Types

Link copied to clipboard
interface Bin<in T : Any, out V> : Domain<T>

The binned data element. Could be a histogram bin with a number of counts or an artificial construct.

Link copied to clipboard
data class Bin1D<T : Comparable<T>, out V>(domain: Domain1D<T>, binValue: V) : Bin<T, V> , ClosedRange<T>

A univariate bin based on a range

Link copied to clipboard
interface Counter<T : Any>

Common representation for atomic counters

Link copied to clipboard
data class DomainBin<in T : Comparable<T>, D : Domain<T>, out V>(domain: D, binValue: V) : Bin<T, V> , Domain<T>

A simple histogram bin based on domain

Link copied to clipboard
interface Histogram<in T : Any, out V, out B : Bin<T, V>>
Link copied to clipboard
interface Histogram1D<T : Comparable<T>, V> : Histogram<T, V, Bin1D<T, V>>
Link copied to clipboard
interface Histogram1DBuilder<in T : Any, V : Any> : HistogramBuilder<T, V>
Link copied to clipboard
interface HistogramBuilder<in T : Any, V : Any>
Link copied to clipboard
interface HistogramGroupND<T : Comparable<T>, D : Domain<T>, V : Any> : Group<HistogramND<T, D, V>> , ScaleOperations<HistogramND<T, D, V>>

A space for producing histograms with values in a NDStructure

Link copied to clipboard
class HistogramND<T : Comparable<T>, D : Domain<T>, V : Any>(group: HistogramGroupND<T, D, V>, values: StructureND<V>) : Histogram<T, V, DomainBin<T, D, V>>
Link copied to clipboard
typealias HyperSquareBin<V> = DomainBin<Double, HyperSquareDomain, V>
Link copied to clipboard
class IntCounter : Counter<Int>
Link copied to clipboard
class LongCounter : Counter<Long>
Link copied to clipboard
class ObjectCounter<T : Any>(group: Group<T>) : Counter<T>
Link copied to clipboard
class TreeHistogram<V : Any>(binMap: TreeMap<Double, Bin1D<Double, V>>) : Histogram1D<Double, V>

A histogram based on a tree map of values

Link copied to clipboard
class TreeHistogramGroup<V : Any, A : Ring<V>, ScaleOperations<V>>(valueAlgebra: A, binFactory: (Double) -> DoubleDomain1D) : Group<TreeHistogram<V>> , ScaleOperations<TreeHistogram<V>>

A space for univariate histograms with variable bin borders based on a tree map

Link copied to clipboard
class UniformHistogram1D<V : Any>(group: UniformHistogram1DGroup<V, *>, values: Map<Int, V>) : Histogram1D<Double, V>
Link copied to clipboard
class UniformHistogram1DGroup<V : Any, A : Ring<V>, ScaleOperations<V>>(valueAlgebra: A, binSize: Double, startPoint: Double) : Group<Histogram1D<Double, V>> , ScaleOperations<Histogram1D<Double, V>>

An algebra for uniform histograms in 1D real space

Link copied to clipboard
class UniformHistogramGroupND<V : Any, A : Field<V>>(valueAlgebraND: FieldOpsND<V, A>, lower: Buffer<Double>, upper: Buffer<Double>, binNums: IntArray, bufferFactory: BufferFactory<V>) : HistogramGroupND<Double, HyperSquareDomain, V>

Multivariate histogram space for hyper-square real-field bins.

Functions

Link copied to clipboard
fun <V : Any, A : Ring<V>, ScaleOperations<V>> Histogram.Companion.custom1D(valueAlgebra: A, borders: Buffer<Double>): TreeHistogramGroup<V, A>

Create a histogram group with custom cell borders

Link copied to clipboard
operator fun IntCounter.dec(): IntCounter
operator fun LongCounter.dec(): LongCounter
Link copied to clipboard
fun <T : Any> Histogram1DBuilder<T, *>.fill(buffer: Buffer<T>)
fun Histogram1DBuilder<Double, *>.fill(array: DoubleArray)
fun Histogram1DBuilder<Double, *>.fill(items: Iterable<Double>)
fun <T : Any> HistogramBuilder<T, *>.fill(sequence: Iterable<Point<T>>)

fun <T : Any> HistogramBuilder<T, *>.fill(block: suspend SequenceScope<Point<T>>.() -> Unit)

Pass a sequence builder into histogram

Link copied to clipboard
operator fun IntCounter.inc(): IntCounter
operator fun LongCounter.inc(): LongCounter
Link copied to clipboard
fun <V : Any> UniformHistogram1DGroup<V, *>.produce(buffer: Buffer<Double>): UniformHistogram1D<V>
Link copied to clipboard
fun <T : Any> HistogramBuilder<T, *>.put(vararg point: T)
fun <T : Any> HistogramBuilder<T, *>.put(point: Point<out T>)
fun HistogramBuilder<Double, *>.put(vararg point: Number)
fun HistogramBuilder<Double, *>.put(vararg point: Double)
Link copied to clipboard
fun <V : Any, A : Ring<V>, ScaleOperations<V>> Histogram.Companion.uniform1D(valueAlgebra: A, binSize: Double, startPoint: Double = 0.0): UniformHistogram1DGroup<V, A>
Link copied to clipboard
fun <V : Any, A : Field<V>> Histogram.Companion.uniformNDFromRanges(valueAlgebraND: FieldOpsND<V, A>, vararg ranges: Pair<ClosedFloatingPointRange<Double>, Int>, bufferFactory: BufferFactory<V> = Buffer.Companion::boxing): UniformHistogramGroupND<V, A>
fun <V : Any, A : Field<V>> Histogram.Companion.uniformNDFromRanges(valueAlgebraND: FieldOpsND<V, A>, vararg ranges: ClosedFloatingPointRange<Double>, bufferFactory: BufferFactory<V> = Buffer.Companion::boxing): UniformHistogramGroupND<V, A>

Use it like

Properties

Link copied to clipboard
val <V : Any> UniformHistogram1D<V>.binValues: Map<Double, V>

Map of bin centers to bin values

Link copied to clipboard
val Bin1D<Double, *>.center: Double