Polymake Template Library (PTL) 4.12
Classes | Namespaces | Functions
GenericMatrix.h File Reference

Classes

class  pm::GenericMatrix< TMatrix, E >
 Generic type for matrices More...
 

Namespaces

namespace  pm
 global namespace for all classes from the polymake project
 
namespace  polymake
 namespace to be used for client code
 
namespace  std
 STL namespace.
 

Functions

template<typename TargetType , typename TMatrix >
const TMatrix & pm::convert_to (const GenericMatrix< TMatrix, TargetType > &m)
 explicit conversion of matrix elements to another type
 
template<typename TVector , typename = std::enable_if_t<is_generic_vector<TVector>::value>>
auto pm::repeat_row (TVector &&v, Int n=0) -> RepeatedRow< diligent_ref_t< unwary_t< TVector > > >
 Create a matrix with n rows, each equal to v.
 
template<typename TVector , typename = std::enable_if_t<is_generic_vector<TVector>::value>>
auto pm::repeat_col (TVector &&v, Int n=0) -> RepeatedCol< diligent_ref_t< unwary_t< TVector > > >
 Create a matrix with n columns, each equal to v.
 
template<typename E >
auto pm::same_element_matrix (E &&x, Int m, Int n)
 
template<typename E >
auto pm::ones_matrix (Int m, Int n)
 
template<typename E >
auto pm::zero_matrix (Int m, Int n)
 
template<typename TVector >
auto pm::vector2row (GenericVector< TVector > &v)
 disguise a GenericVector as a matrix with 1 row
 
template<typename TVector >
auto pm::vector2col (GenericVector< TVector > &v)
 disguise a GenericVector as a matrix with 1 column
 
template<typename TVector >
auto pm::diag (const GenericVector< TVector > &v)
 Create a square diagonal matrix from a GenericVector.
 
template<typename TVector >
auto pm::anti_diag (const GenericVector< TVector > &v)
 Create a anti-diagonal matrix.
 
template<typename E >
auto pm::unit_matrix (Int dim)
 Create a unit_matrix of dimension dim.
 
template<typename E , typename Matrix1 , typename Matrix2 >
auto pm::diag (const GenericMatrix< Matrix1, E > &m1, const GenericMatrix< Matrix2, E > &m2)
 Create a block-diagonal matrix.
 
template<typename E , typename Vector1 , typename Matrix2 >
auto pm::diag (const GenericVector< Vector1, E > &v1, const GenericMatrix< Matrix2, E > &m2)
 
template<typename E , typename Matrix1 , typename Vector2 >
auto pm::diag (const GenericMatrix< Matrix1, E > &m1, const GenericVector< Vector2, E > &v2)
 
template<typename E , typename Matrix1 , typename Matrix2 >
auto pm::anti_diag (const GenericMatrix< Matrix1, E > &m1, const GenericMatrix< Matrix2, E > &m2)
 Create a block-anti-diagonal matrix.
 
template<typename E , typename Vector1 , typename Matrix2 >
auto pm::anti_diag (const GenericVector< Vector1, E > &v1, const GenericMatrix< Matrix2, E > &m2)
 
template<typename E , typename Matrix1 , typename Vector2 >
auto pm::anti_diag (const GenericMatrix< Matrix1, E > &m1, const GenericVector< Vector2, E > &v2)