Polymake Template Library (PTL): pm::GenericMatrix< TMatrix, E > Class Template Reference
pm::GenericMatrix< TMatrix, E > Class Template Reference

Generic type for matrices More...

Inherits pm::Generic< Top >, pm::matrix_methods< Matrix, E, RowCategory, ColCategory >, and pm::operators::base.

Public Member Functions

top_type & operator= (const GenericMatrix &m)
 
template<typename TMatrix2 >
void swap (GenericMatrix< TMatrix2, E > &m)
 
template<typename E2 >
void fill (const E2 &x)
 
template<typename TMatrix2 >
std::enable_if< compatible_symmetry_types< TMatrix2 >), top_type & >::type operator+= (const GenericMatrix< TMatrix2 > &m)
 adding a GenericMatrix
 
template<typename TMatrix2 >
std::enable_if< compatible_symmetry_types< TMatrix2 >), top_type & >::type operator-= (const GenericMatrix< TMatrix2, E > &m)
 subtracting a GenericMatrix
 
template<typename Right >
top_type & operator*= (const Right &r)
 multiply with an element
 
template<typename Right >
std::enable_if< isomorphic_types< E, Right >::value, top_type & >::type div_exact (const Right &r)
 divide by an element
 
template<typename TMatrix2 >
std::enable_if< is_expandable_by< TMatrix2 >), top_type & >::type operator/= (const GenericMatrix< TMatrix2 > &m)
 append the rows of a GenericMatrix
 
template<typename TVector >
std::enable_if< is_expandable_by< TVector >), top_type & >::type operator/= (const GenericVector< TVector > &v)
 append a GenericVector as a row
 
template<typename TMatrix2 >
std::enable_if< is_expandable_by< TMatrix2 >), top_type & >::type operator|= (const GenericMatrix< TMatrix2 > &m)
 append the columns of a GenericMatrix
 
template<typename TVector >
std::enable_if< is_expandable_by< TVector >), top_type & >::type operator|= (const GenericVector< TVector > &v)
 append a GenericVector as a column
 
IndexedSlice< ConcatRows< unwary_t< TMatrix > > &, series > diagonal (int i=0)
 
IndexedSlice< ConcatRows< unwary_t< TMatrix > > &, series > anti_diagonal (int i=0)
 

Detailed Description

template<typename TMatrix, typename E = typename TMatrix::element_type>
class pm::GenericMatrix< TMatrix, E >

Generic type for matrices

Member Function Documentation

template<typename TMatrix, typename E = typename TMatrix::element_type>
IndexedSlice<ConcatRows<unwary_t<TMatrix> >&, series> pm::GenericMatrix< TMatrix, E >::anti_diagonal ( int  i = 0)
inline
Parameters
i==0main anti-diagonal; i>0: i-th diagonal below the main; i<0: (-i)-th above the main
template<typename TMatrix, typename E = typename TMatrix::element_type>
IndexedSlice<ConcatRows<unwary_t<TMatrix> >&, series> pm::GenericMatrix< TMatrix, E >::diagonal ( int  i = 0)
inline
Parameters
i==0main diagonal; i>0: i-th diagonal below the main; i<0: (-i)-th above the main
template<typename TMatrix, typename E = typename TMatrix::element_type>
template<typename E2 >
void pm::GenericMatrix< TMatrix, E >::fill ( const E2 &  x)
inline

Fill with given value without changing the dimensions. x can be of arbitrary type assignable to the type E2.

template<typename TMatrix, typename E = typename TMatrix::element_type>
top_type& pm::GenericMatrix< TMatrix, E >::operator= ( const GenericMatrix< TMatrix, E > &  m)
inline

Persistent matrix objects have after the assignment the same dimensions as the right hand side operand. Alias objects, such as matrix minor or block matrix, cannot be resized, thus must have the same dimensions as on the right hand side.

template<typename TMatrix, typename E = typename TMatrix::element_type>
template<typename TMatrix2 >
void pm::GenericMatrix< TMatrix, E >::swap ( GenericMatrix< TMatrix2, E > &  m)
inline

Exchange the contents of two matrices in a most efficient way. If at least one non-persistent object is involved, the operands must have equal dimensions.


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