Crate rstats[−][src]
Modules
Macros
macro here!()
gives &str
with the current file:line path::function
for error messages.
Structs
Mean and standard deviation (or std ratio for geometric mean)
Median and quartiles
Minimum value, its index, Maximum value, its index
Traits
A few of the Stats
methods are reimplemented here
(only for f64), so that they mutate self
in-place.
This is more efficient and convenient in some circumstances.
Vector mutating operations that take one argument of f64 end type.
Mutable vector operations that take one generic argument.
A few of the essential Vecg
methods are reimplemented here
to mutate self
in-place (only for f64).
This is for efficiency and convenience, for example, in
vector iterative methods.
Statistical measures of a single variable (one generic vector of data) and
vector algebra applicable to a single (generic) vector.
Thus these methods take no arguments.
There is just one limitation: data of end type i64
has to be explicitly converted to f64
.
That is to raise awareness that, in this particular case, some precision may be lost.
Function statsg::i64tof64(&s)
will convert the whole slice.
Methods applicable to a single argument: a vector of vectors of generic end type. Operations on a set of multidimensional vectors.
Methods applicable to vector of vectors of generic end type and one argument of a similar kind.
A few specialised methods applicable to Vec<Vec<u8>>
(vector of vectors of bytes).
Vector algebra: methods operaing on one vector of generic end type and the second argument, which is a scalar or vector of f64 end type.
Vector Algebra on two vectors (represented here as generic slices).
Also included are scalar operations on the self
vector.
Methods specialised to, or more efficient for &[u8]
Functions
Generates a vector of n vectors, each of length d, all filled with random numbers for testing.
It needs two seeds s1 and s2. Same seeds will produce the same random sequence.
Uses local closure rand
to generate random numbers (avoids dependencies).
Random numbers are in the open interval 0..1 with uniform distribution.
Generates a vector of n vectors, each of length d, all filled with random numbers for testing.
It needs two seeds s1 and s2. Same seeds will produce the same random sequence.
Uses local closure rand
to generate random numbers (avoids dependencies).
Random numbers are in the closed interval 0..255 with uniform distribution.
Necessary recast of a whole i64 slice to f64
Print vector of vectors
Potentially useful recast of a whole slice
Helper function to format in green a single item.
Sum of linear weights 1..n. Also the size of an upper or lower triangle of a square array (including the diagonal)
Helper function write vector
. Formats Vec
that can be Displayed without recourse to Debug.
Saves space by using ssv instead of csv.
This must be done in Rust item by item, hence the iteration.
You can remove the green colour incantations at the beginning
and at the end, if not wanted.