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

Generic type for matrices More...

#include <GenericMatrix.h>

Inheritance diagram for polymake::GenericMatrix< TMatrix, E >:

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)
 
top_type & negate ()
 negate elements in place
 
template<typename TMatrix2>
std::enable_if< is_expandable_by< TMatrix2 >(), top_type & >::type operator/= (const GenericMatrix< TMatrix2 > &m)
 append rows of another matrix
 
template<typename TVector>
std::enable_if< is_expandable_by< TVector >(), top_type & >::type operator/= (const GenericVector< TVector > &v)
 append a vector as a row
 
template<typename TMatrix2>
std::enable_if_t< is_expandable_by< TMatrix2 >(), top_type & > operator|= (const GenericMatrix< TMatrix2 > &m)
 append columns of another matrix
 
template<typename TVector>
std::enable_if_t< is_expandable_by< TVector >(), top_type & > operator|= (const GenericVector< TVector > &v)
 append a vector as a column
 
IndexedSlice< masquerade< ConcatRows, const typename Unwary< TMatrix >::type & >, const series > diagonal (Int i=0) const &
 
IndexedSlice< masquerade< ConcatRows, const typename Unwary< TMatrix >::type & >, const series > anti_diagonal (Int i=0) const &
 

Detailed Description

template<typename TMatrix, typename E>
class polymake::GenericMatrix< TMatrix, E >

Generic type for matrices

Member Function Documentation

◆ anti_diagonal()

template<typename TMatrix, typename E>
IndexedSlice< masquerade< ConcatRows, const typename Unwary< TMatrix >::type & >, const series > pm::GenericMatrix< TMatrix, E >::anti_diagonal ( Int i = 0) const &
inline
Parameters
i==0main anti-diagonal; i>0: i-th diagonal below the main; i<0: (-i)-th above the main

◆ diagonal()

template<typename TMatrix, typename E>
IndexedSlice< masquerade< ConcatRows, const typename Unwary< TMatrix >::type & >, const series > pm::GenericMatrix< TMatrix, E >::diagonal ( Int i = 0) const &
inline
Parameters
i==0main diagonal; i>0: i-th diagonal below the main; i<0: (-i)-th above the main

◆ fill()

template<typename TMatrix, typename E>
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.

◆ operator=()

template<typename TMatrix, typename E>
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.

◆ swap()

template<typename TMatrix, typename E>
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: