class Histogram[T] extends Stat with LazyLogging
The histogram's state is stored in an indexed array, where the index is the bin number and the values are the counts.
e.g. a range of 0 to 3 with 3 bins will result in these bins: [0, 1), [1, 2), [2, 3) and the array will contain three entries.
- T
a comparable type which must have a StatHelperFunctions type class
- Alphabetic
- By Inheritance
- Histogram
- LazyLogging
- Stat
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Histogram(sft: SimpleFeatureType, property: String, initialBins: Int, initialEndpoints: (T, T))(implicit defaults: MinMaxDefaults[T], ct: ClassTag[T])
- sft
simple feature type
- property
property name for the attribute the histogram is being made for
- initialBins
number of bins the histogram has
- initialEndpoints
lower/upper end of histogram
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: Histogram[T]): Histogram[T]
Creates a new histogram by combining another histogram with this one.
-
def
+(other: Stat)(implicit d: DummyImplicit): Stat
Non type-safe add - if stats are not the same type, will throw an exception
Non type-safe add - if stats are not the same type, will throw an exception
- other
the other stat to add
- Definition Classes
- Stat
-
def
+=(other: Histogram[T]): Unit
Copies another histogram into this one.
-
def
+=(other: Stat)(implicit d: DummyImplicit): Unit
Non type-safe add - if stats are not the same type, will throw an exception
Non type-safe add - if stats are not the same type, will throw an exception
- other
the other stat to add
- Definition Classes
- Stat
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
addCountsFrom(other: Histogram[T]): Unit
Copies another histogram into this one.
Copies another histogram into this one. In comparison to +=, this method will preserve the current bounds and length.
- other
other histogram
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def bounds(i: Int): (T, T)
- def bounds: (T, T)
-
def
clear(): Unit
Clears the stat to its original state when first initialized.
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
- def count(i: Int): Long
- implicit val ct: ClassTag[T]
- implicit val defaults: MinMaxDefaults[T]
- def directIndex(value: Long): Int
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def indexOf(value: T): Int
-
def
isEmpty: Boolean
Necessary method used by the StatIterator.
-
def
isEquivalent(other: Stat): Boolean
Compares the two stats for equivalence.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def length: Int
-
lazy val
logger: Logger
- Attributes
- protected
- Definition Classes
- LazyLogging
- Annotations
- @transient()
- def max: T
- def medianValue(i: Int): T
- def min: T
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
def
observe(sf: SimpleFeature): Unit
Compute statistics based upon the given simple feature.
- val property: String
-
val
sft: SimpleFeatureType
The simple feature type that this stat operates on
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toJson: String
Returns a JSON representation of the Stat
-
def
toJsonObject: Map[String, Any]
Returns a representation of the Stat to be serialized
Returns a representation of the Stat to be serialized
This function should return a representation (view) of the Stat to be serialized as JSON. Instances of Map can be used to represent JSON dictionaries or Seq for JSON arrays. A collection.SortedMap such as collection.immutable.ListMap is recommended if key order should be deterministic. Other types may be used but could require the creation and registration of custom serializers dependent on the JSON framework being utilized (currently Gson).
- returns
stat as a json serializable object
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
unobserve(sf: SimpleFeature): Unit
Tries to remove the given simple feature from the compiled statistics.
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated