Scythe-1.0.3
|
Definitions and implementations for functions that perform common linear algebra manipulations on Scythe Matrix objects. More...
#include "scythestat/matrix.h"
#include "scythestat/algorithm.h"
#include "scythestat/error.h"
#include "scythestat/lapack.h"
#include <numeric>
#include <algorithm>
#include <set>
Go to the source code of this file.
Namespaces | |
namespace | scythe |
The Scythe library namespace. | |
Functions | |
template<matrix_order RO, matrix_style RS, typename T , matrix_order PO, matrix_style PS> | |
Matrix< T, RO, RS > | scythe::t (const Matrix< T, PO, PS > &M) |
Transpose a Matrix. | |
template<typename T , matrix_order O, matrix_style S> | |
Matrix< T, O, Concrete > | scythe::t (const Matrix< T, O, S > &M) |
template<typename T , matrix_order O, matrix_style S> | |
Matrix< T, O, S > | scythe::ones (unsigned int rows, unsigned int cols) |
Create a matrix of ones. | |
template<typename T , matrix_order O> | |
Matrix< T, O, Concrete > | scythe::ones (unsigned int rows, unsigned int cols) |
template<typename T > | |
Matrix< T, Col, Concrete > | scythe::ones (unsigned int rows, unsigned int cols) |
template<typename T , matrix_order O, matrix_style S> | |
Matrix< T, O, S > | scythe::eye (unsigned int k) |
Create a k by k identity Matrix. | |
template<typename T , matrix_order O> | |
Matrix< T, O, Concrete > | scythe::eye (uint k) |
template<typename T > | |
Matrix< T, Col, Concrete > | scythe::eye (uint k) |
template<typename T , matrix_order O, matrix_style S> | |
Matrix< T, O, S > | scythe::seqa (T start, T incr, uint rows) |
Create a rows x 1 vector-additive sequence Matrix. | |
template<typename T , matrix_order O> | |
Matrix< T, O, Concrete > | scythe::seqa (T start, T incr, uint rows) |
template<typename T > | |
Matrix< T, Col, Concrete > | scythe::seqa (T start, T incr, uint rows) |
Matrix< double, Col, Concrete > | scythe::seqa (double start, double incr, uint rows) |
template<matrix_order SORT_ORDER, matrix_order RO, matrix_style RS, typename T , matrix_order PO, matrix_style PS> | |
Matrix< T, RO, RS > | scythe::sort (const Matrix< T, PO, PS > &M) |
Sort a Matrix. | |
template<matrix_order SORT_ORDER, typename T , matrix_order O, matrix_style S> | |
Matrix< T, O, Concrete > | scythe::sort (const Matrix< T, O, S > &M) |
template<typename T , matrix_order O, matrix_style S> | |
Matrix< T, O, Concrete > | scythe::sort (const Matrix< T, O, S > &M) |
template<matrix_order RO, matrix_style RS, typename T , matrix_order PO, matrix_style PS> | |
Matrix< T, RO, RS > | scythe::sortc (const Matrix< T, PO, PS > &M) |
Sort the columns of a Matrix. | |
template<typename T , matrix_order O, matrix_style S> | |
Matrix< T, O, Concrete > | scythe::sortc (const Matrix< T, O, S > &M) |
template<matrix_order RO, matrix_style RS, typename T , matrix_order PO1, matrix_style PS1, matrix_order PO2, matrix_style PS2> | |
Matrix< T, RO, RS > | scythe::cbind (const Matrix< T, PO1, PS1 > &A, const Matrix< T, PO2, PS2 > &B) |
Column bind two matrices. | |
template<typename T , matrix_order PO1, matrix_style PS1, matrix_order PO2, matrix_style PS2> | |
Matrix< T, PO1, Concrete > | scythe::cbind (const Matrix< T, PO1, PS1 > &A, const Matrix< T, PO2, PS2 > &B) |
template<matrix_order RO, matrix_style RS, typename T , matrix_order PO1, matrix_style PS1, matrix_order PO2, matrix_style PS2> | |
Matrix< T, RO, RS > | scythe::rbind (const Matrix< T, PO1, PS1 > &A, const Matrix< T, PO2, PS2 > &B) |
Row bind two matrices. | |
template<typename T , matrix_order PO1, matrix_style PS1, matrix_order PO2, matrix_style PS2> | |
Matrix< T, PO1, Concrete > | scythe::rbind (const Matrix< T, PO1, PS1 > &A, const Matrix< T, PO2, PS2 > &B) |
template<matrix_order RO, matrix_style RS, typename T , matrix_order PO, matrix_style PS> | |
Matrix< unsigned int, RO, RS > | scythe::order (const Matrix< T, PO, PS > &M) |
Calculate the rank-order of each element in a Matrix. | |
template<typename T , matrix_order O, matrix_style S> | |
Matrix< unsigned int, O, Concrete > | scythe::order (const Matrix< T, O, S > &M) |
template<matrix_order RO, matrix_style RS, typename T , matrix_order PO1, matrix_style PS1, matrix_order PO2, matrix_style PS2> | |
Matrix< T, RO, RS > | scythe::selif (const Matrix< T, PO1, PS1 > &M, const Matrix< bool, PO2, PS2 > &e) |
Locate rows for which a binary column vector equals 1. | |
template<typename T , matrix_order PO1, matrix_style PS1, matrix_order PO2, matrix_style PS2> | |
Matrix< T, PO1, Concrete > | scythe::selif (const Matrix< T, PO1, PS1 > &M, const Matrix< bool, PO2, PS2 > &e) |
template<matrix_order RO, matrix_style RS, typename T , matrix_order PO, matrix_style PS> | |
Matrix< T, RO, RS > | scythe::unique (const Matrix< T, PO, PS > &M) |
Find unique elements in a Matrix. | |
template<typename T , matrix_order O, matrix_style S> | |
Matrix< T, O, Concrete > | scythe::unique (const Matrix< T, O, S > &M) |
template<matrix_order RO, matrix_style RS, typename T , matrix_order PO, matrix_style PS> | |
Matrix< T, RO, RS > | scythe::vech (const Matrix< T, PO, PS > &M) |
Vectorize a symmetric Matrix. | |
template<typename T , matrix_order O, matrix_style S> | |
Matrix< T, O, Concrete > | scythe::vech (const Matrix< T, O, S > &M) |
template<matrix_order RO, matrix_style RS, typename T , matrix_order PO, matrix_style PS> | |
Matrix< T, RO, RS > | scythe::xpnd (const Matrix< T, PO, PS > &v) |
template<typename T , matrix_order O, matrix_style S> | |
Matrix< T, O, Concrete > | scythe::xpnd (const Matrix< T, O, S > &v) |
template<matrix_order RO, matrix_style RS, typename T , matrix_order PO, matrix_style PS> | |
Matrix< T, RO, RS > | scythe::diag (const Matrix< T, PO, PS > &M) |
Return the diagonal of a Matrix. | |
template<typename T , matrix_order O, matrix_style S> | |
Matrix< T, O, Concrete > | scythe::diag (const Matrix< T, O, S > &M) |
template<matrix_order RO, matrix_style RS, typename T , matrix_order PO1, matrix_style PS1, matrix_order PO2, matrix_style PS2, matrix_order PO3, matrix_style PS3> | |
Matrix< T, RO, RS > | scythe::gaxpy (const Matrix< T, PO1, PS1 > &A, const Matrix< T, PO2, PS2 > &B, const Matrix< T, PO3, PS3 > &C) |
template<typename T , matrix_order PO1, matrix_style PS1, matrix_order PO2, matrix_style PS2, matrix_order PO3, matrix_style PS3> | |
Matrix< T, PO1, Concrete > | scythe::gaxpy (const Matrix< T, PO1, PS1 > &A, const Matrix< T, PO2, PS2 > &B, const Matrix< T, PO3, PS3 > &C) |
template<matrix_order RO, matrix_style RS, typename T , matrix_order PO, matrix_style PS> | |
Matrix< T, RO, RS > | scythe::crossprod (const Matrix< T, PO, PS > &A) |
template<typename T , matrix_order O, matrix_style S> | |
Matrix< T, O, Concrete > | scythe::crossprod (const Matrix< T, O, S > &M) |
template<> | |
Matrix | scythe::gaxpy< Col, Concrete, double, Col, Concrete, Col, Concrete, Col, Concrete > (const Matrix<> &A, const Matrix<> &B, const Matrix<> &C) |
template<> | |
Matrix | scythe::crossprod (const Matrix<> &A) |
Definitions and implementations for functions that perform common linear algebra manipulations on Scythe Matrix objects.
This file provides a number of common linear algebraic functions for use with the Matrix class. These functions include common operations such as transposition, a number of utility functions for creating useful matrices like the identity matrix, and efficient implementations for common operations like the cross-product.