include/algebramix/matrix.hpp File Reference
#include <basix/iterator.hpp>
#include <basix/vector.hpp>
#include <algebramix/permutation.hpp>
#include <algebramix/matrix_naive.hpp>
Go to the source code of this file.
Classes
- class matrix< C, V >
- struct fast_helper< matrix< C, V > >
- struct as_helper< matrix< T, TV >, matrix< F, FV > >
- struct matrix_fixed< V, RS, CS >
- struct implementation< F, matrix_fixed< V, RS, CS > >
- struct implementation< matrix_defaults, matrix_fixed< V, RS, CS > >
- class matrix_iterator_rep< C, V >
- struct binary_helper< matrix< C, V > >
- struct lift_helper< matrix< C, V > >
- struct project_helper< matrix< C, V > >
Namespaces
Defines
- #define Matrix_variant(C) matrix_variant_helper<C>::MV
- #define TMPL_DEF template<typename C, typename V= typename Matrix_variant(C)>
- #define TMPL template<typename C, typename V>
- #define TMPLK template<typename C, typename V, typename K>
- #define Format format<C>
- #define Matrix matrix<C,V>
- #define Matrix_rep matrix_rep<C,V>
- #define Abs_matrix matrix<Abs_type(C),V>
- #define Real_matrix matrix<Real_type(C),V>
- #define Center_matrix matrix<Center_type(C),V>
- #define Radius_matrix matrix<Radius_type(C),V>
- #define Lifted_matrix matrix<Lift_type(C)>
- #define Projected_matrix matrix<Project_type(C)>
- #define Reconstructed_matrix matrix<Reconstruct_type(C)>
- #define Truncated_matrix matrix<Truncate_type(C)>
- #define Completed_matrix matrix<Complete_type(C)>
- #define Evaluated_matrix matrix<Evaluate_type(C,K)>
- #define FMatrix matrix<C,matrix_fixed<V,RS,CS> >
- #define FMatrix_rep matrix_rep<C,matrix_fixed<V,RS,CS> >
- #define INLINE_SCAL_LINE_OP(name1, name2)
- #define INLINE_LINES_OP(name1, name2)
Functions
- template<typename C , typename V > nat cols (const matrix< C, V > &m)
- template<typename C , typename V > nat rows (const matrix< C, V > &m)
- template<typename C , typename V > bool is_a_scalar (const matrix< C, V > &m)
- template<typename C , typename V > bool is_non_scalar (const matrix< C, V > &m)
- template<typename C , typename V > C * tab (matrix< C, V > &m)
- template<typename C , typename V > const C * tab (const matrix< C, V > &m)
- template<typename C , typename V = typename matrix_variant_helper< C >::MV> class matrix_rep REP_STRUCT_1 (C)
- INDIRECT_IMPL_2 (matrix, matrix_rep, typename C, C, typename V, V) DEFINE_UNARY_FORMAT_2(matrix) template< typename C
- template<typename C , typename V > nat nbcol (const matrix< C, V > &m)
- template<typename C , typename V > nat nbrow (const matrix< C, V > &m)
- template<typename C , typename V > nat N (const matrix< C, V > &m)
- template<typename C , typename V > format< C > CF (const matrix< C, V > &m)
- template<typename C , typename V > bool is_square_matrix (const matrix< C, V > &m)
- template<typename C , typename V > const C & read (const matrix< C, V > &m, nat i, nat j)
- template<typename C , typename V , typename C2 , typename V2 > matrix< C, V > extend (const matrix< C, V > &m, const matrix< C2, V2 > &n)
- STYPE_TO_TYPE (template< typename C, typename V >, scalar_type, matrix< C, V >, C)
- UNARY_RETURN_TYPE (template< typename C, typename V >, abs_op, matrix< C, V >, matrix< Abs_type(C), V >)
- UNARY_RETURN_TYPE (template< typename C, typename V >, Re_op, matrix< C, V >, matrix< Real_type(C), V >)
- UNARY_RETURN_TYPE (template< typename C, typename V >, center_op, matrix< C, V >, matrix< Center_type(C), V >)
- UNARY_RETURN_TYPE (template< typename C, typename V >, radius_op, matrix< C, V >, matrix< Radius_type(C), V >)
- UNARY_RETURN_TYPE (template< typename C, typename V >, lift_op, matrix< C, V >, matrix< Lift_type(C)>)
- UNARY_RETURN_TYPE (template< typename C, typename V >, project_op, matrix< C, V >, matrix< Project_type(C)>)
- UNARY_RETURN_TYPE (template< typename C, typename V >, reconstruct_op, matrix< C, V >, matrix< Reconstruct_type(C)>)
- BINARY_RETURN_TYPE (template< typename C, typename V >, truncate_op, matrix< C, V >, nat, matrix< Truncate_type(C)>)
- UNARY_RETURN_TYPE (template< typename C, typename V >, complete_op, matrix< C, V >, matrix< Complete_type(C)>)
- BINARY_RETURN_TYPE (template< typename C, typename V, typename K >, evaluate_op, matrix< C, V >, K, matrix< Evaluate_type(C, K)>)
- template<typename T , typename F , typename TV , typename FV > void set_as (matrix< T, TV > &r, const matrix< F, FV > &m)
- template<typename C , typename V , typename T > void set_as (matrix< C, V > &r, const T &x)
- template<typename C , typename V , typename RS , typename CS > class matrix_rep< C,
matrix_fixed< V, RS, CS > > REP_STRUCT_1 (C)
- template<typename C , typename V , typename RS , typename CS > nat cols (const matrix< C, matrix_fixed< V, RS, CS > > &m)
- template<typename C , typename V , typename RS , typename CS > nat rows (const matrix< C, matrix_fixed< V, RS, CS > > &m)
- template<typename C , typename V , typename RS , typename CS > bool is_a_scalar (const matrix< C, matrix_fixed< V, RS, CS > > &m)
- template<typename C , typename V , typename RS , typename CS > bool is_non_scalar (const matrix< C, matrix_fixed< V, RS, CS > > &m)
- template<typename C , typename V > iterator< C > iterate (const matrix< C, V > &m)
- template<typename C , typename V > syntactic flatten (const matrix< C, V > &m)
- template<typename Op , typename C , typename V > nat unary_hash (const matrix< C, V > &m)
- template<typename Op , typename C , typename V > matrix< Unary_return_type(Op,
C), V > unary_map (const matrix< C, V > &m)
- template<typename Op , typename C1 , typename C2 , typename V > matrix< Binary_return_type(Op,
C1, C2), V > binary_map (const matrix< C1, V > &m, const matrix< C2, V > &n)
- template<typename Op , typename C , typename V , typename X > matrix< Binary_return_type(Op,
C, X), V > binary_map_scalar (const matrix< C, V > &m, const X &x)
- template<typename Op , typename C , typename V > matrix< C, V > & nullary_set (matrix< C, V > &m)
- template<typename Op , typename T , typename C , typename V > matrix< T, V > & unary_set (matrix< T, V > &m, const matrix< C, V > &n)
- template<typename Op , typename T , typename V , typename X > matrix< T, V > & unary_set_scalar (matrix< T, V > &m, const X &x)
- template<typename Op , typename C1 , typename C2 , typename V > bool binary_test (const matrix< C1, V > &m, const matrix< C2, V > &n)
- template<typename Op , typename C , typename V > Unary_return_type (Op, C) big(const matrix<C
- Fun matrix< D > map (const Fun &fun, const matrix< S1 > &m, const format< D > &fm)
- template<typename C , typename V > void set_default (matrix< C, V > &m)
- template<typename C , typename V > void set_pi (matrix< C, V > &m)
- template<typename C , typename V > void set_log2 (matrix< C, V > &m)
- template<typename C , typename V > void set_euler (matrix< C, V > &m)
- template<typename C , typename V > void set_catalan (matrix< C, V > &m)
- template<typename C , typename V > void set_imaginary (matrix< C, V > &m)
- template<typename C , typename V > void set_nan (matrix< C, V > &m)
- template<typename C , typename V > void set_fuzz (matrix< C, V > &m)
- template<typename C , typename V > void set_smallest (matrix< C, V > &m)
- template<typename C , typename V > void set_largest (matrix< C, V > &m)
- template<typename C , typename V > void set_accuracy (matrix< C, V > &m)
- template<typename C , typename V > void set_infinity (matrix< C, V > &m)
- template<typename C , typename V > void set_maximal (matrix< C, V > &m)
- template<typename C , typename V > void set_minimal (matrix< C, V > &m)
- template<typename C , typename V > matrix< C, V > copy (const matrix< C, V > &m)
- template<typename C , typename V > matrix< C, V > duplicate (const matrix< C, V > &m)
- template<typename C , typename V > matrix< C, V > operator- (const matrix< C, V > &m)
- template<typename C , typename V > matrix< C, V > operator+ (const matrix< C, V > &m, const matrix< C, V > &n)
- template<typename C , typename V > matrix< C, V > operator+ (const matrix< C, V > &m, const C &n)
- template<typename C , typename V > matrix< C, V > operator+ (const C &m, const matrix< C, V > &n)
- template<typename C , typename V > matrix< C, V > operator- (const matrix< C, V > &m, const matrix< C, V > &n)
- template<typename C , typename V > matrix< C, V > operator- (const matrix< C, V > &m, const C &n)
- template<typename C , typename V > matrix< C, V > operator- (const C &m, const matrix< C, V > &n)
- template<typename C , typename V > matrix< C, V > operator* (const matrix< C, V > &m, const C &c)
- template<typename C , typename V > matrix< C, V > operator* (const C &c, const matrix< C, V > &m)
- template<typename C , typename V > matrix< C, V > operator/ (const matrix< C, V > &m, const C &c)
- template<typename C , typename V > matrix< C, V > quo (const matrix< C, V > &m, const C &c)
- template<typename C , typename V > matrix< C, V > rem (const matrix< C, V > &m, const C &c)
- template<typename C , typename V > matrix< C, V > & operator+= (matrix< C, V > &m, const matrix< C, V > &n)
- template<typename C , typename V > matrix< C, V > & operator-= (matrix< C, V > &m, const matrix< C, V > &n)
- template<typename C , typename V > matrix< C, V > & operator*= (matrix< C, V > &m, const C &x)
- template<typename C , typename V > matrix< C, V > & operator/= (matrix< C, V > &m, const C &x)
- template<typename C , typename V > bool operator<= (const matrix< C, V > &m, const matrix< C, V > &n)
- template<typename C , typename V > bool operator>= (const matrix< C, V > &m, const matrix< C, V > &n)
- template<typename C , typename V , typename K > bool operator== (const matrix< C, V > &m, const K &c)
- template<typename C , typename V , typename K > bool operator!= (const matrix< C, V > &m, const K &c)
- template<typename C , typename V , typename K > bool operator== (const K &c, const matrix< C, V > &m)
- template<typename C , typename V , typename K > bool operator!= (const K &c, const matrix< C, V > &m)
- template<typename C , typename V , typename K > bool operator<= (const matrix< C, V > &m, const C &c)
- template<typename C , typename V , typename K > bool operator>= (const matrix< C, V > &m, const C &c)
- TRUE_IDENTITY_OP_SUGAR (template< typename C, typename V >, matrix< C, V >) EXACT_IDENTITY_OP_SUGAR(template< typename C
- STRICT_COMPARE_SUGAR (template< typename C, typename V >, matrix< C, V >) template< typename C
- V matrix< C, V > derive (const matrix< C, V > &m)
- template<typename C , typename V > matrix< C, V > integrate (const matrix< C, V > &m)
- template<typename C , typename V , typename K , typename W > matrix< C, V > integrate_init (const matrix< C, V > &m, const matrix< K, W > &n)
- template<typename C , typename V > C big_add (const matrix< C, V > &m)
- template<typename C , typename V > C big_sup (const matrix< C, V > &m)
- template<typename C , typename V > C big_max (const matrix< C, V > &m)
- template<typename C , typename V > matrix< Reconstruct_type(C)> reconstruct (const matrix< C, V > &v)
- template<typename C , typename V , typename W > bool is_reconstructible (const matrix< C, V > &v, matrix< Reconstruct_type(C), W > &w)
- template<typename C , typename V , typename K > matrix< Evaluate_type(C, K)> evaluate (const matrix< C, V > &v, const K &x)
- template<typename C , typename V , typename K , typename W > bool is_evaluable (const matrix< C, V > &v, const K &a, matrix< Evaluate_type(C, K), W > &w)
- template<typename C , typename V > matrix< Truncate_type(C)> truncate (const matrix< C, V > &v, nat n)
- template<typename C , typename V > matrix< Complete_type(C)> complete (const matrix< C, V > &v)
- template<typename C , typename V > bool is_finite (const matrix< C, V > &m)
- template<typename C , typename V > bool is_nan (const matrix< C, V > &m)
- template<typename C , typename V > bool is_infinite (const matrix< C, V > &m)
- template<typename C , typename V > bool is_fuzz (const matrix< C, V > &m)
- template<typename C , typename V > bool is_reliable (const matrix< C, V > &m)
- template<typename C , typename V > matrix< C, V > change_precision (const matrix< C, V > &m, xnat p)
- template<typename C , typename V > xnat precision (const matrix< C, V > &m)
- template<typename C , typename V > xint exponent (const matrix< C, V > &m)
- template<typename C , typename V > double magnitude (const matrix< C, V > &m)
- template<typename C , typename V > matrix< Abs_type(C), V > abs (const matrix< C, V > &m)
- template<typename C , typename V > matrix< Real_type(C), V > Re (const matrix< C, V > &m)
- template<typename C , typename V > matrix< Real_type(C), V > Im (const matrix< C, V > &m)
- template<typename C , typename V > matrix< C, V > conj (const matrix< C, V > &m)
- template<typename C , typename V > matrix< Center_type(C), V > center (const matrix< C, V > &m)
- template<typename C , typename V > matrix< Radius_type(C), V > radius (const matrix< C, V > &m)
- template<typename C , typename V > matrix< Center_type(C), V > lower (const matrix< C, V > &m)
- template<typename C , typename V > matrix< Center_type(C), V > upper (const matrix< C, V > &m)
- template<typename C , typename V > matrix< C, V > sharpen (const matrix< C, V > &m)
- template<typename C , typename V , typename K > matrix< C, V > blur (const matrix< C, V > &m, const K &x)
- template<typename C , typename V , typename C2 , typename V2 > matrix< C, V > blur (const matrix< C, V > &m, const matrix< C2, V2 > &n)
- template<typename C , typename V > bool included (const matrix< C, V > &m, const matrix< C, V > &n)
- template<typename C > matrix< C > identity_matrix (const int &n, const format< C > &fm=format< C >())
- template<typename C > matrix< C > fill_matrix (const C &x, const int &r, const int &c)
- template<typename C > matrix< C > tensor_matrix (const vector< C > &v, const vector< C > &w)
- template<typename C > matrix< C > hilbert_matrix (const int &n, const format< C > &fm=format< C >())
- template<typename C > matrix< C > vandermonde (const vector< C > &v)
- template<typename C > matrix< C > jordan_matrix (const C &c, const int &n)
- template<typename C > matrix< C > toeplitz_matrix (const vector< C > &v)
- template<typename C > matrix< C > hankel_matrix (const vector< C > &v)
- template<typename C , typename V > matrix< C, V > horizontal_join (const matrix< C, V > &m1, const matrix< C, V > &m2)
- template<typename C , typename V > matrix< C, V > vertical_join (const matrix< C, V > &m1, const matrix< C, V > &m2)
- template<typename C , typename V > matrix< C, V > transpose (const matrix< C, V > &m)
- template<typename C , typename V > matrix< C, V > range (const matrix< C, V > &m, nat r1, nat c1, nat r2, nat c2)
- template<typename C , typename V > matrix< C, V > delete_row (const matrix< C, V > &m, nat r)
- template<typename C , typename V > matrix< C, V > delete_col (const matrix< C, V > &m, nat c)
- template<typename C , typename V > matrix< C, V > operator* (const matrix< C, V > &m, const matrix< C, V > &n)
- template<typename C , typename V , typename W > vector< C, W > operator* (const matrix< C, V > &m, const vector< C, W > &v)
- template<typename C , typename V , typename W > vector< C, W > operator* (const vector< C, W > &v, const matrix< C, V > &m)
- template<typename C , typename V > vector< C > row (const matrix< C, V > &m, nat i)
- template<typename C , typename V > vector< C > column (const matrix< C, V > &m, nat j)
- template<typename C > vector< vector< C > > row_vectors (const matrix< C > &m)
- template<typename C > matrix< C > row_matrix (const vector< vector< C > > &v)
- template<typename C , typename V > void swap_row (matrix< C, V > &m, nat i, nat j)
- template<typename C , typename V > void swap_col (matrix< C, V > &m, nat i, nat j)
- template<typename C , typename V > void reverse_cols (matrix< C, V > &m)
- template<typename C , typename V > void row_mul (matrix< C, V > &m, C c, nat i)
- template<typename C , typename V > void row_div (matrix< C, V > &m, C c, nat i)
- template<typename C , typename V > void col_mul (matrix< C, V > &m, C c, nat i)
- template<typename C , typename V > void col_div (matrix< C, V > &m, C c, nat i)
- template<typename C , typename V > void rows_linsub (matrix< C, V > &m, nat i, C ci, nat j, C cj)
- template<typename C , typename V > void cols_linsub (matrix< C, V > &m, nat i, C ci, nat j, C cj)
- template<typename C , typename V > matrix< C > as_matrix (const permutation &p, const format< C > &fm=format< C >())
- template<typename C , typename V > void permute_columns (matrix< C, V > &m, const permutation &p)
- template<typename C , typename V > void permute_rows (matrix< C, V > &m, const permutation &p)
- template<typename C , typename V > matrix< C, V > operator* (const matrix< C, V > &m, const permutation &p)
- template<typename C , typename V > matrix< C, V > operator* (const permutation &p, const matrix< C, V > &m)
- template<typename C , typename V > matrix< C, V > column_echelon (const matrix< C, V > &m, bool reduced=false)
- template<typename C , typename V > matrix< C, V > column_reduced_echelon (const matrix< C, V > &m)
- template<typename C , typename V > matrix< C, V > column_reduced_echelon (const matrix< C, V > &m, permutation &permut)
- template<typename C , typename V > matrix< C, V > column_echelon (const matrix< C, V > &m, matrix< C, V > &k, bool reduced=false)
- template<typename C , typename V > matrix< C, V > column_reduced_echelon (const matrix< C, V > &m, matrix< C, V > &k)
- template<typename C , typename V > matrix< C, V > row_echelon (const matrix< C, V > &m, bool reduced=false)
- template<typename C , typename V > matrix< C, V > row_reduced_echelon (const matrix< C, V > &m)
- template<typename C , typename V > matrix< C, V > row_echelon (const matrix< C, V > &m, matrix< C, V > &k, bool reduced=false)
- template<typename C , typename V > matrix< C, V > row_reduced_echelon (const matrix< C, V > &m, matrix< C, V > &k)
- template<typename C , typename V > C det (const matrix< C, V > &m)
- template<typename C , typename V > C first_minor (const matrix< C, V > &m, nat i, nat j)
- template<typename C , typename V > C cofactor (const matrix< C, V > &m, nat i, nat j)
- template<typename C , typename V > matrix< C, V > invert (const matrix< C, V > &m)
- template<typename C , typename V > matrix< C, V > operator/ (const C &c, const matrix< C, V > &m)
- template<typename C , typename V > matrix< C, V > kernel (const matrix< C, V > &m)
- template<typename C , typename V > matrix< C, V > image (const matrix< C, V > &m)
- template<typename C , typename V > nat rank (const matrix< C, V > &m)
- template<typename C , typename V > matrix< C, V > krylov (const matrix< C, V > &m, const matrix< C, V > &v)
- template<typename C , typename V > matrix< C, V > row_orthogonalization (const matrix< C, V > &m)
- template<typename C , typename V > matrix< C, V > column_orthogonalization (const matrix< C, V > &m)
- template<typename C , typename V > matrix< C, V > row_orthogonalization (const matrix< C, V > &m, matrix< C, V > &l)
- template<typename C , typename V > matrix< C, V > column_orthogonalization (const matrix< C, V > &m, matrix< C, V > &l)
- template<typename C , typename V > matrix< C, V > row_orthonormalization (const matrix< C, V > &m)
- template<typename C , typename V > matrix< C, V > column_orthonormalization (const matrix< C, V > &m)
- template<typename C , typename V > matrix< C, V > row_orthonormalization (const matrix< C, V > &m, matrix< C, V > &l)
- template<typename C , typename V > matrix< C, V > column_orthonormalization (const matrix< C, V > &m, matrix< C, V > &l)
Variables
Define Documentation
#define Abs_matrix matrix<Abs_type(C),V> |
#define Center_matrix matrix<Center_type(C),V> |
#define Completed_matrix matrix<Complete_type(C)> |
#define Evaluated_matrix matrix<Evaluate_type(C,K)> |
#define FMatrix matrix<C,matrix_fixed<V,RS,CS> > |
#define FMatrix_rep matrix_rep<C,matrix_fixed<V,RS,CS> > |
Definition at line 25 of file matrix.hpp.
Referenced by binary_helper< matrix< C, V > >::assemble(), mmx::big_add(), matrix< M >::matrix(), polynomial< L >::polynomial(), binary_helper< polynomial< C, V > >::read(), binary_helper< matrix< C, V > >::read(), mmx::REP_STRUCT_1(), fast_helper< polynomial< C, V > >::uu(), and fast_helper< matrix< C, V > >::uu().
#define INLINE_LINES_OP |
( |
name1, |
|
|
name2 |
|
) |
|
Value:TMPL void name1 (Matrix& m, nat i, C ci, nat j, C cj) { \
typedef implementation<matrix_linear,V> Mat; \
ASSERT (is_non_scalar (m), "non-scalar matrix expected"); \
nat mrows=rows(m), mcols=cols(m); \
Mat::name2 (tab(m), i, ci, j, cj, mrows, mcols); \
}
Definition at line 1089 of file matrix.hpp.
#define INLINE_SCAL_LINE_OP |
( |
name1, |
|
|
name2 |
|
) |
|
Value:TMPL void name1 (Matrix& m, C c, nat i) { \
typedef implementation<matrix_linear,V> Mat; \
ASSERT (is_non_scalar (m), "non-scalar matrix expected"); \
nat mrows=rows(m), mcols=cols(m); \
Mat::name2 (tab(m), c, i, mrows, mcols); \
}
Definition at line 1081 of file matrix.hpp.
#define Lifted_matrix matrix<Lift_type(C)> |
#define Matrix matrix<C,V> |
Definition at line 26 of file matrix.hpp.
Referenced by mmx::access(), binary_helper< matrix< C, V > >::assemble(), mmx::column_echelon(), mmx::column_orthogonalization(), mmx::column_orthonormalization(), mmx::column_reduced_echelon(), mmx::delete_col(), mmx::delete_row(), mmx::extend(), mmx::get_matrix_format(), mmx::horizontal_join(), mmx::image(), ldiv_mat_series_rep< M, V >::initialize(), ldiv_vec_series_rep< M, V >::initialize(), mmx::invert(), mmx::kernel(), mmx::krylov(), implementation< matrix_multiply, V, matrix_crt< W > >::mul(), matrix_series_rep< C, V, U >::next(), lshiftz_series_matrix_rep< M, V >::next(), mmx::operator!=(), mmx::operator*(), mmx::operator+(), mmx::operator-(), mmx::operator<=(), mmx::operator==(), mmx::operator>=(), mmx::range(), binary_helper< matrix< C, V > >::read(), mmx::REP_STRUCT_1(), mmx::row_echelon(), mmx::row_orthogonalization(), mmx::row_orthonormalization(), mmx::set_as(), mmx::solve_lde(), mmx::transpose(), fast_helper< matrix< C, V > >::uu(), and mmx::vertical_join().
#define Matrix_rep matrix_rep<C,V> |
#define Matrix_variant |
( |
C |
|
) |
matrix_variant_helper<C>::MV |
#define Projected_matrix matrix<Project_type(C)> |
#define Radius_matrix matrix<Radius_type(C),V> |
#define Real_matrix matrix<Real_type(C),V> |
#define Reconstructed_matrix matrix<Reconstruct_type(C)> |
#define TMPL template<typename C, typename V> |
#define TMPL_DEF template<typename C, typename V= typename Matrix_variant(C)> |
#define TMPLK template<typename C, typename V, typename K> |
#define Truncated_matrix matrix<Truncate_type(C)> |