Statistic

gapt.utils.Statistic
See theStatistic companion class
object Statistic

Companion object to Statistic. Provides a csv header and convenience methods for statistic options and empty data lists.

Attributes

Companion
class
Source
Statistics.scala
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Statistic.type

Members list

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
Source
Mirror.scala

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def alsoEmptyDataToCSV[T](s: Seq[T])(implicit num: Numeric[T], conv: T => BigDecimal): Seq[String]

Produces CSV data of statistics for non-empty data, and 'not applicable' values otherwise.

Produces CSV data of statistics for non-empty data, and 'not applicable' values otherwise.

Type parameters

T

the type of data to create statistics on (must be measurable in terms of num and conv)

Value parameters

conv

a measure for calculating the avarage and standard deviation in the statistic

num

the implicit converter to treat elements of s as numeric types

s

a sequence of data

Attributes

Returns

CSV data for s if it is non-empty, Statistic.na_statistic otherwise

Source
Statistics.scala
def apply[T](values: Seq[T])(implicit num: Numeric[T], conv: T => BigDecimal): Statistic[T]

Creates a statistic from a collection of values of type T.

Creates a statistic from a collection of values of type T.

Type parameters

T

the type of elements

Value parameters

conv

a measure that maps the elements of T to big decimals

num

the implicit Numeric object with implementations for the algebraic operators

values

the collection of values

Attributes

Returns

the statistic belonging to the values

Source
Statistics.scala
def applyOpt[T](values: Seq[T])(implicit num: Numeric[T], conv: T => BigDecimal): Option[Statistic[T]]

Creates a statistic from a collection of values of type T, if values is non-empty

Creates a statistic from a collection of values of type T, if values is non-empty

Type parameters

T

the type of elements

Value parameters

conv

a measure that maps the elements of T to big decimals

num

the implicit Numeric object with implementations for the algebraic operators

values

the collection of values

Attributes

Returns

the statistic belonging to the values

Source
Statistics.scala
def csv_header(tag: String): List[String]

create a list of descriptions of the form tag-min, tag-max etc. that matches the order of Statistic.toCSV

create a list of descriptions of the form tag-min, tag-max etc. that matches the order of Statistic.toCSV

Value parameters

tag

the prefix for the columns

Attributes

Source
Statistics.scala
def optCSV[T](s: Option[Statistic[T]]): List[String]

Converts a statistic option to CSV with a default of not applicable

Converts a statistic option to CSV with a default of not applicable

Type parameters

T

the type of data elements of the statistic

Value parameters

s

an optional statistic

Attributes

Returns

CSV data for s, if it exists na_statistic otherwise

Source
Statistics.scala

Concrete fields

val na: String

Attributes

Source
Statistics.scala
val na_statistic: List[String]

static "not applicable" CSV value for a non-existing statistic

static "not applicable" CSV value for a non-existing statistic

Attributes

Source
Statistics.scala