void copyin(float **x, ssize_t rows, ssize_t cols)
Copy 2-d array x of size rows x cols into matrix.
ssize_t floor_matrix(EST_FMatrix &M, const float floor)
EST_FVector diagonal(const EST_FMatrix &a)
extract leading diagonal as a vector
EST_FMatrix & operator*=(const float f)
elementwise multiply by scalar
int square(const EST_FMatrix &a)
void eye(EST_FMatrix &a, const ssize_t n)
some useful matrix creators make an identity matrix of dimension n
void make_poly_basis_function(EST_FMatrix &T, EST_FVector t)
EST_FMatrix(const EST_FMatrix &a)
copy constructor
void make_random_vector(EST_FVector &M, const float scale)
all elements are randomised
A vector class for floating point numbers. EST_FVector x should be used instead of float *x wherever ...
void make_random_matrix(EST_FMatrix &M, const float scale)
all elements are randomised
void est_seed()
the user should use est_seed to seed the random number generator
void make_random_symmetric_matrix(EST_FMatrix &M, const float scale)
used for covariance
void stack_matrix(const EST_FMatrix &M, EST_FVector &v)
stack columns on top of each other to make a vector
bool polynomial_fit(EST_FVector &x, EST_FVector &y, EST_FVector &co_effs, int order)
least squares fit
void multiply(const EST_FMatrix &a, const EST_FMatrix &b, EST_FMatrix &c)
void make_random_diagonal_matrix(EST_FMatrix &M, const float scale)
used for variance
EST_FMatrix fmatrix_abs(const EST_FMatrix &a)
EST_FMatrix(int m, int n)
size constructor
const float & a(ssize_t row, ssize_t col) const
void column(EST_TVector< float > &cv, ssize_t c, ssize_t start_r=0, int len=-1)
Make the vector cv a window onto column c
EST_write_status save(const EST_String &filename, const EST_String &type=EST_FMatrix::default_file_type)
Save in file (ascii or binary)
EST_FMatrix triangulate(const EST_FMatrix &a)
EST_FMatrix & operator-=(const EST_FMatrix &a)
Subtract elements of 2 same sized matrices.
static EST_String default_file_type
float polynomial_value(const EST_FVector &coeffs, const float x)
EST_FVector(ssize_t n)
Size constructor.
EST_FMatrix & operator/=(const float f)
elementwise divide by scalar
float vector_max(const EST_FVector &a)
find largest element
#define VAL_REGISTER_CLASS_DCLS(NAME, CLASS)
float determinant(const EST_FMatrix &a)
EST_FMatrix()
default constructor
EST_FVector()
Default constructor.
EST_FMatrix diagonalise(const EST_FMatrix &a)
extract leading diagonal as a matrix
void transpose(const EST_FMatrix &a, EST_FMatrix &b)
exchange rows and columns
EST_FVector subtract(const EST_FVector &a, const EST_FVector &b)
elementwise subtract
EST_FMatrix operator-(const EST_FMatrix &a, const EST_FMatrix &b)
float sum(const EST_FMatrix &a)
sum of elements
EST_read_status load(const EST_String &filename)
Load from file (ascii or binary as defined in file)
void symmetrize(EST_FMatrix &a)
enforce symmetry
EST_FVector add(const EST_FVector &a, const EST_FVector &b)
elementwise add
void row(EST_TVector< float > &rv, ssize_t r, ssize_t start_c=0, int len=-1)
Make the vector rv a window onto row r
int singular(EST_FMatrix &a)
not implemented ??
friend EST_FMatrix operator*(const EST_FMatrix &a, const float x)
Multiply all elements of matrix by x.
void inplace_diagonalise(EST_FMatrix &a)
inplace diagonalise
EST_FMatrix operator+(const EST_FMatrix &a, const EST_FMatrix &b)
int inverse(const EST_FMatrix &a, EST_FMatrix &inv)
inverse
int pseudo_inverse(const EST_FMatrix &a, EST_FMatrix &inv)
pseudo inverse (for non-square matrices)
A subclass of EST_TMatrix which copies using memcopy.
float matrix_max(const EST_FMatrix &a)
find largest element
EST_FMatrix sub(const EST_FMatrix &a, ssize_t row, ssize_t col)
INLINE ssize_t n() const
number of items in vector.
EST_FVector(const EST_FVector &a)
Copy constructor.
EST_read_status est_load(const EST_String &filename)
Load from file in est format (binary/ascii defined in file itself)
EST_FMatrix cov_prod(const EST_FVector &v1, const EST_FVector &v2)
matrix product of two vectors (#rows = length of first vector, #cols = length of second vector) ...
EST_FMatrix & operator+=(const EST_FMatrix &a)
Add elements of 2 same sized matrices.
EST_write_status est_save(const EST_String &filename, const EST_String &type)
Save in file in est format.