MyMediaLite  3.03
Static Public Member Functions
VectorExtensions Class Reference

Extensions for vector-like data. More...

List of all members.

Static Public Member Functions

static double EuclideanNorm (this ICollection< double > vector)
 Compute the Euclidean norm of a collection of doubles.
static double EuclideanNorm (this ICollection< float > vector)
 Compute the Euclidean norm of a collection of floats.
static void Inc (this IList< double > vector1, IList< double > vector2)
 Increment a vector by another one.
static void Inc (this IList< float > vector1, IList< float > vector2)
 Increment a vector by another one.
static void Inc (this IList< double > vector1, IList< float > vector2)
 Increment a vector by another one.
static void Init (this IList< float > vector, float val)
 Initialize a collection of floats with one value.
static void InitNormal (this IList< double > vector, double mean, double stddev)
 Initialize a collection of doubles with values from a normal distribution.
static void InitNormal (this IList< float > vector, double mean, double stddev)
 Initialize a collection of floats with values from a normal distribution.
static double L1Norm (this ICollection< double > vector)
 Compute the L1 norm of a collection of doubles.
static void Multiply (this IList< double > vector, double x)
 Multiply a vector by a scalar.
static void Multiply (this IList< float > vector, float x)
 Multiply a vector by a scalar.
static void Multiply (this IList< float > vector, double x)
 Multiply a vector by a scalar.
static double ScalarProduct (IList< double > v1, IList< double > v2)
 Compute scalar product (dot product) of two vectors.
static float ScalarProduct (IList< float > v1, IList< float > v2)
 Compute scalar product (dot product) of two vectors.

Detailed Description

Extensions for vector-like data.


Member Function Documentation

static double EuclideanNorm ( this ICollection< double >  vector) [inline, static]

Compute the Euclidean norm of a collection of doubles.

Parameters:
vectorthe vector to compute the norm for
Returns:
the Euclidean norm of the vector
static double EuclideanNorm ( this ICollection< float >  vector) [inline, static]

Compute the Euclidean norm of a collection of floats.

Parameters:
vectorthe vector to compute the norm for
Returns:
the Euclidean norm of the vector
static void Inc ( this IList< double >  vector1,
IList< double >  vector2 
) [inline, static]

Increment a vector by another one.

Parameters:
vector1the vector to be incremented
vector2the vector to be added to the first one
static void Inc ( this IList< float >  vector1,
IList< float >  vector2 
) [inline, static]

Increment a vector by another one.

Parameters:
vector1the vector to be incremented
vector2the vector to be added to the first one
static void Inc ( this IList< double >  vector1,
IList< float >  vector2 
) [inline, static]

Increment a vector by another one.

Parameters:
vector1the vector to be incremented
vector2the vector to be added to the first one
static void Init ( this IList< float >  vector,
float  val 
) [inline, static]

Initialize a collection of floats with one value.

Parameters:
vectorthe vector to initialize
valthe value to set each element to
static void InitNormal ( this IList< double >  vector,
double  mean,
double  stddev 
) [inline, static]

Initialize a collection of doubles with values from a normal distribution.

Parameters:
vectorthe vector to initialize
meanthe mean of the normal distribution
stddevthe standard deviation of the normal distribution
static void InitNormal ( this IList< float >  vector,
double  mean,
double  stddev 
) [inline, static]

Initialize a collection of floats with values from a normal distribution.

Parameters:
vectorthe vector to initialize
meanthe mean of the normal distribution
stddevthe standard deviation of the normal distribution
static double L1Norm ( this ICollection< double >  vector) [inline, static]

Compute the L1 norm of a collection of doubles.

Parameters:
vectorthe vector to compute the norm for
Returns:
the L1 norm of the vector
static void Multiply ( this IList< double >  vector,
double  x 
) [inline, static]

Multiply a vector by a scalar.

Parameters:
vectorthe vector to be multiplied
xthe scalar
static void Multiply ( this IList< float >  vector,
float  x 
) [inline, static]

Multiply a vector by a scalar.

Parameters:
vectorthe vector to be multiplied
xthe scalar
static void Multiply ( this IList< float >  vector,
double  x 
) [inline, static]

Multiply a vector by a scalar.

Parameters:
vectorthe vector to be multiplied
xthe scalar
static double ScalarProduct ( IList< double >  v1,
IList< double >  v2 
) [inline, static]

Compute scalar product (dot product) of two vectors.

Returns:
the scalar product of the arguments
Parameters:
v1the first vector
v2the second vector
static float ScalarProduct ( IList< float >  v1,
IList< float >  v2 
) [inline, static]

Compute scalar product (dot product) of two vectors.

Returns:
the scalar product of the arguments
Parameters:
v1the first vector
v2the second vector

The documentation for this class was generated from the following file: