plll  1.0
plll::linalg::math_colvector< T, Rows, StorageTraits > Class Template Reference

Represents a math column vector with coefficients in T. More...

#include <matrix.hpp>

Inheritance diagram for plll::linalg::math_colvector< T, Rows, StorageTraits >:
plll::linalg::base_colvector< T, Rows, StorageTraits, true > plll::linalg::base_matrix< T, Rows, 1, StorageTraits, MathObject > plll::linalg::implementation::row_count_storage< Rows > plll::linalg::implementation::col_count_storage< Cols >

Public Member Functions

 math_colvector ()
 Creates a new column vector. The dimensions are set to zero if no compile-time dimensions were specified. The elements are default-constructed.
 
template<bool MO>
 math_colvector (const base_matrix< T, Rows, 1, StorageTraits, MO > &mat)
 Creates a copy of the column vector mat. More...
 
 math_colvector (const math_colvector< T, Rows, StorageTraits > &mat)
 Creates a copy of the column vector mat. More...
 
template<typename S , int Rs, int Cs, typename ST , bool MO>
 math_colvector (const base_matrix< S, Rs, Cs, ST, MO > &mat)
 Creates a copy of the column vector mat. More...
 
template<typename MatrixType >
 math_colvector (const MatrixType &mat)
 Creates a copy of the column vector mat. More...
 
 math_colvector (size_type entries)
 Creates a column vector with entries entries. Its coefficients are default-constructed. More...
 
 math_colvector (int entries)
 Creates a column vector with entries entries. Its coefficients are default-constructed. More...
 
template<typename S , bool def>
 math_colvector (size_type entries, const implementation::Initialize_Impl< S, def > &i)
 Creates a column vector with entries entries. Its coefficients are copy-constructed from i.ref(). More...
 
 math_colvector (size_type rows, size_type cols)
 Creates a column vector with cols entries. Its coefficients are default-constructed. More...
 
template<typename S , bool def>
 math_colvector (size_type rows, size_type cols, const implementation::Initialize_Impl< S, def > &i)
 Creates a column vector with cols entries. Its coefficients are copy-constructed from i.ref(). More...
 
template<typename MatrixType >
math_colvector< T, Rows,
StorageTraits > & 
operator= (const MatrixType &m)
 Copies the contents of the column vector m into *this. More...
 
 ~math_colvector () PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Releases the memory allocated for the column vector.
 
- Public Member Functions inherited from plll::linalg::base_colvector< T, Rows, StorageTraits, true >
 base_colvector ()
 Creates a new column vector. The dimensions are set to zero if no compile-time dimensions were specified. The elements are default-constructed.
 
 base_colvector (const base_matrix< T, Rows, 1, StorageTraits, MO > &mat)
 Creates a copy of the column vector mat. More...
 
 base_colvector (const base_colvector< T, Rows, StorageTraits > &mat)
 Creates a copy of the column vector mat. More...
 
 base_colvector (const base_matrix< S, Rs, Cs, ST, MO > &mat)
 Creates a copy of the column vector mat. More...
 
 base_colvector (const MatrixType &mat)
 Creates a copy of the column vector mat. More...
 
 base_colvector (size_type entries)
 Creates a column vector with entries entries. Its coefficients are default-constructed. More...
 
 base_colvector (int entries)
 Creates a column vector with entries entries. Its coefficients are default-constructed. More...
 
 base_colvector (size_type entries, const implementation::Initialize_Impl< S, def > &i)
 Creates a column vector with entries entries. Its coefficients are copy-constructed from i.ref(). More...
 
 base_colvector (size_type rows, size_type cols)
 Creates a column vector with cols entries. Its coefficients are default-constructed. More...
 
 base_colvector (size_type rows, size_type cols, const implementation::Initialize_Impl< S, def > &i)
 Creates a column vector with cols entries. Its coefficients are copy-constructed from i.ref(). More...
 
base_colvector< T, Rows,
StorageTraits, MathObject > & 
operator= (const MatrixType &m)
 Copies the contents of the column vector m into *this. More...
 
 ~base_colvector () PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Releases the memory allocated for the column vector.
 
- Public Member Functions inherited from plll::linalg::base_matrix< T, Rows, 1, StorageTraits, MathObject >
void assign_resize (const MatrixType &mat)
 Resizes the matrix to fit the format of mat and assigns the contents of mat to the matrix. More...
 
 base_matrix ()
 Creates a new matrix. The dimensions are set to zero if no compile-time dimensions were specified. The elements are default-constructed.
 
 base_matrix (const base_matrix< T, Rows, Cols, StorageTraits, MathObject > &mat)
 Creates a copy of the matrix mat. More...
 
 base_matrix (const base_matrix< T, Rs, Cs, StorageTraits, MO > &mat)
 Creates a copy of the matrix mat. More...
 
 base_matrix (const base_matrix< S, Rs, Cs, ST, MO > &mat)
 Creates a copy of the matrix mat. More...
 
 base_matrix (const implementation::expressions::expr< Op, Data > &mat)
 Creates a copy of the matrix mat. More...
 
 base_matrix (size_type entries)
 Creates a vector with entries entries. Its coefficients are default-constructed. More...
 
 base_matrix (int entries)
 Creates a vector with entries entries. Its coefficients are default-constructed. More...
 
 base_matrix (size_type entries, const implementation::Initialize_Impl< S, def > &i)
 Creates a vector with entries entries. Its coefficients are copy-constructed from i.ref(). More...
 
 base_matrix (size_type rows, size_type cols)
 Creates a matrix with rows times cols entries. Its coefficients are default-constructed. More...
 
 base_matrix (size_type rows, size_type cols, const implementation::Initialize_Impl< S, def > &i)
 Creates a matrix with rows times cols entries. Its coefficients are copy-constructed from i.ref(). More...
 
implementation::expressions::expr
< implementation::expressions::sub
< SRows, SCols >::template
operation_generic,
implementation::expressions::MatrixWrapper
< base_matrix< T, Rows, Cols,
StorageTraits, MathObject > > > 
block (size_type r_ofs, size_type c_ofs)
 Returns a submatrix of SRows rows and SCols columns starting at (r_ofs, c_ofs). More...
 
implementation::expressions::expr
< implementation::expressions::sub
< SRows, SCols >::template
operation_generic,
implementation::expressions::ConstMatrixWrapper
< base_matrix< T, Rows, Cols,
StorageTraits, MathObject > > > 
block (size_type r_ofs, size_type c_ofs) const
 Returns a submatrix of SRows rows and SCols columns starting at (r_ofs, c_ofs). More...
 
implementation::expressions::expr
< implementation::expressions::sub
< Flexible, Flexible >
::template operation_generic,
implementation::expressions::MatrixWrapper
< base_matrix< T, Rows, Cols,
StorageTraits, MathObject > > > 
block (size_type r_ofs, size_type c_ofs, size_type rows, size_type cols)
 Returns a submatrix of rows rows and cols columns starting at (r_ofs, c_ofs). More...
 
implementation::expressions::expr
< implementation::expressions::sub
< Flexible, Flexible >
::template operation_generic,
implementation::expressions::ConstMatrixWrapper
< base_matrix< T, Rows, Cols,
StorageTraits, MathObject > > > 
block (size_type r_ofs, size_type c_ofs, size_type rows, size_type cols) const
 Returns a submatrix of rows rows and cols columns starting at (r_ofs, c_ofs). More...
 
implementation::expressions::expr
< implementation::expressions::sub_1d
< Rows >::template
operation_col,
implementation::expressions::MatrixWrapper
< base_matrix< T, Rows, Cols,
StorageTraits, MathObject > > > 
col (size_type col_index)
 Returns the col_index-th column of this matrix. More...
 
implementation::expressions::expr
< implementation::expressions::sub_1d
< Rows >::template
operation_col,
implementation::expressions::ConstMatrixWrapper
< base_matrix< T, Rows, Cols,
StorageTraits, MathObject > > > 
col (size_type col_index) const
 Returns the col_index-th column of this matrix. More...
 
size_type cols () const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Returns the number of columns of the matrix. More...
 
StorageTraits::constpointer_type data () const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Returns a pointer to the raw data of the matrix. More...
 
StorageTraits::pointer_type data () PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Returns a pointer to the raw data of the matrix. More...
 
StorageTraits::constref_type data (size_type i) const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Returns a (raw) reference to the i-th entry. More...
 
StorageTraits::ref_type data (size_type i) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Returns a (raw) reference to the i-th entry. More...
 
Enumerator enumerate () PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Enumerates all entries of the current matrix. More...
 
ConstEnumerator enumerate () const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Enumerates all entries of the current matrix. More...
 
ColEnumerator enumerate_col (size_type col) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Enumerates all entries of the given column. More...
 
ConstColEnumerator enumerate_col (size_type col) const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Enumerates all entries of the given column. More...
 
ColsEnumerator enumerate_cols () PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Enumerates all columns. For each column, a column enumerator is given. More...
 
ConstColsEnumerator enumerate_cols () const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Enumerates all columns. For each column, a column enumerator is given. More...
 
RowEnumerator enumerate_row (size_type row) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Enumerates all entries of the given row. More...
 
ConstRowEnumerator enumerate_row (size_type row) const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Enumerates all entries of the given row. More...
 
RowsEnumerator enumerate_rows () PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Enumerates all rows. For each row, a row enumerator is given. More...
 
ConstRowsEnumerator enumerate_rows () const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Enumerates all rows. For each row, a row enumerator is given. More...
 
void get_coeff (ResultType &result, size_type i, size_type j) const PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(result=d_data[i *implementation::col_count_storage< Cols >::cols()+j]))
 Retrieves the coefficient (i, j) and stores its value into result. More...
 
bool get_coeff_alwayszero () const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Queries whether all coefficients are definitely zero. More...
 
GetCoeffSteps_Type get_coeff_steps (size_type i, size_type j) const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Returns a object of type GetCoeffSteps_Type which constructs the coefficient at (i, j). More...
 
bool involves_this_matrix (const base_matrix< T, Rows, Cols, StorageTraits, MathObject > &A) const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Tests whether this matrix (or expression) involves A. More...
 
bool involves_this_matrix (const MatrixType &A) const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Tests whether this matrix (or expression) involves A. More...
 
void move_resize (const MatrixType &mat)
 Resizes the matrix to fit the format of mat and moves the contents of mat to the matrix. More...
 
StorageTraits::constref_type operator() (size_type i, size_type j) const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Retrieves and returns the coefficient (i, j). More...
 
StorageTraits::ref_type operator() (size_type i, size_type j) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Retrieves and returns the coefficient (i, j). More...
 
base_matrix< T, Rows, Cols,
StorageTraits, MathObject > & 
operator= (const base_matrix< T, Rows, Cols, StorageTraits, MathObject > &m)
 Copies the contents of the matrix m into *this. More...
 
base_matrix< T, Rows, Cols,
StorageTraits, MathObject > & 
operator= (const base_matrix< T_, Rows_, Cols_, StorageTraits_, MathObject_ > &m)
 Copies the contents of the matrix m into *this. More...
 
base_matrix< T, Rows, Cols,
StorageTraits, MathObject > & 
operator= (const implementation::expressions::expr< Op, Data > &m)
 Copies the contents of the matrix m into *this. More...
 
StorageTraits::constref_type operator[] (size_type i) const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Retrieves and returns the i-th entry of the vector. More...
 
StorageTraits::ref_type operator[] (size_type i) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Retrieves and returns the i-th entry of the vector. More...
 
void resize (size_type new_size)
 Resizes the vector to new_size entries. If new_size exceeds the current size, new elements are default-constructed. More...
 
void resize (size_type new_size, const implementation::Initialize_Impl< S, def > &init)
 Resizes the vector to new_size entries. If new_size exceeds the current size, new elements are copy-constructed from init.ref(). More...
 
void resize (size_type new_rows, size_type new_cols)
 Resizes the matrix to new_rows times new_cols entries. If the new matrix has entries which cannot be taken from the old matrix, they are default-constructed. More...
 
void resize (size_type new_rows, size_type new_cols, const implementation::Initialize_Impl< S, def > &init)
 Resizes the matrix to new_rows times new_cols entries. If the new matrix has entries which cannot be taken from the old matrix, they are copy-constructed from init.ref(). More...
 
implementation::expressions::expr
< implementation::expressions::sub_1d
< Cols >::template
operation_row,
implementation::expressions::MatrixWrapper
< base_matrix< T, Rows, Cols,
StorageTraits, MathObject > > > 
row (size_type row_index)
 Returns the row_index-th row of this matrix. More...
 
implementation::expressions::expr
< implementation::expressions::sub_1d
< Cols >::template
operation_row,
implementation::expressions::ConstMatrixWrapper
< base_matrix< T, Rows, Cols,
StorageTraits, MathObject > > > 
row (size_type row_index) const
 Returns the row_index-th row of this matrix. More...
 
size_type rows () const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Returns the number of rows of the matrix. More...
 
size_type size () const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Returns the number of entries of the matrix. This equals rows() * cols(). More...
 
void swap (MatrixType &B)
 Swaps the contents of this matrix with the matrix B. More...
 
bool test_involvement (const MatrixType &A) const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 For the underlying matrices U of the current expression, calls A.involves_this_matrix(U). Returns true if any of these returns true. More...
 
implementation::expressions::expr
< implementation::expressions::transpose,
implementation::expressions::MatrixWrapper
< base_matrix< T, Rows, Cols,
StorageTraits, MathObject > > > 
transpose () PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Returns the transpose of this matrix. More...
 
implementation::expressions::expr
< implementation::expressions::transpose,
implementation::expressions::ConstMatrixWrapper
< base_matrix< T, Rows, Cols,
StorageTraits, MathObject > > > 
transpose () const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Returns the transpose of this matrix. More...
 
 ~base_matrix () PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Releases the memory allocated for the matrix.
 

Additional Inherited Members

- Public Types inherited from plll::linalg::base_matrix< T, Rows, 1, StorageTraits, MathObject >
typedef
StorageTraits::constpointer_type 
data_pointer_type
 Return type for the method data() const.
 
typedef
StorageTraits::constref_type 
data_ref_type
 Return type for the method data(size_type) const.
 

Detailed Description

template<typename T, int Rows, typename StorageTraits>
class plll::linalg::math_colvector< T, Rows, StorageTraits >

Represents a math column vector with coefficients in T.

This is in fact the same as base_matrix<T, Rows, 1, StorageTraits, true>.

Template Parameters
TThe coefficient type.
RowsIf set to plll::linalg::Flexible, allows to flexibly choose and change the number of rows. Otherwise, enforces fixed number of rows during compile time. Default value is plll::linalg::Flexible.
StorageTraitsAllows to determine how the vector's contents are stored. The default value is plll::linalg::storage_traits<T>, which should usually not be changed.

Definition at line 386 of file matrix.hpp.

Constructor & Destructor Documentation

template<typename T, int Rows, typename StorageTraits >
template<bool MO>
plll::linalg::math_colvector< T, Rows, StorageTraits >::math_colvector ( const base_matrix< T, Rows, 1, StorageTraits, MO > &  mat)
inline

Creates a copy of the column vector mat.

Parameters
matThe column vector to copy from.

Definition at line 3935 of file matrix.hpp.

template<typename T, int Rows, typename StorageTraits >
plll::linalg::math_colvector< T, Rows, StorageTraits >::math_colvector ( const math_colvector< T, Rows, StorageTraits > &  mat)
inline

Creates a copy of the column vector mat.

Parameters
matThe column vector to copy from.

Definition at line 3946 of file matrix.hpp.

template<typename T, int Rows, typename StorageTraits >
template<typename S , int Rs, int Cs, typename ST , bool MO>
plll::linalg::math_colvector< T, Rows, StorageTraits >::math_colvector ( const base_matrix< S, Rs, Cs, ST, MO > &  mat)
inline

Creates a copy of the column vector mat.

Parameters
matThe column vector to copy from.

Definition at line 3958 of file matrix.hpp.

template<typename T, int Rows, typename StorageTraits >
template<typename MatrixType >
plll::linalg::math_colvector< T, Rows, StorageTraits >::math_colvector ( const MatrixType &  mat)
inline

Creates a copy of the column vector mat.

Parameters
matThe column vector to copy from.

Definition at line 3970 of file matrix.hpp.

template<typename T, int Rows, typename StorageTraits >
plll::linalg::math_colvector< T, Rows, StorageTraits >::math_colvector ( size_type  entries)
inline

Creates a column vector with entries entries. Its coefficients are default-constructed.

Parameters
entriesThe number of entries.

Definition at line 3982 of file matrix.hpp.

template<typename T, int Rows, typename StorageTraits >
plll::linalg::math_colvector< T, Rows, StorageTraits >::math_colvector ( int  entries)
inline

Creates a column vector with entries entries. Its coefficients are default-constructed.

Parameters
entriesThe number of entries.

Definition at line 3994 of file matrix.hpp.

template<typename T, int Rows, typename StorageTraits >
template<typename S , bool def>
plll::linalg::math_colvector< T, Rows, StorageTraits >::math_colvector ( size_type  entries,
const implementation::Initialize_Impl< S, def > &  i 
)
inline

Creates a column vector with entries entries. Its coefficients are copy-constructed from i.ref().

Parameters
entriesThe number of entries.
iThe element from which to copy-construct the coefficients.

Definition at line 4008 of file matrix.hpp.

template<typename T, int Rows, typename StorageTraits >
plll::linalg::math_colvector< T, Rows, StorageTraits >::math_colvector ( size_type  rows,
size_type  cols 
)
inline

Creates a column vector with cols entries. Its coefficients are default-constructed.

Parameters
rowsMust always be 1.
colsThe number of columns of the column vector.

Definition at line 4021 of file matrix.hpp.

template<typename T, int Rows, typename StorageTraits >
template<typename S , bool def>
plll::linalg::math_colvector< T, Rows, StorageTraits >::math_colvector ( size_type  rows,
size_type  cols,
const implementation::Initialize_Impl< S, def > &  i 
)
inline

Creates a column vector with cols entries. Its coefficients are copy-constructed from i.ref().

Parameters
rowsMust always be 1.
colsThe number of columns of the column vector.
iThe element from which to copy-construct the coefficients.

Definition at line 4036 of file matrix.hpp.

Member Function Documentation

template<typename T, int Rows, typename StorageTraits >
template<typename MatrixType >
math_colvector<T, Rows, StorageTraits>& plll::linalg::math_colvector< T, Rows, StorageTraits >::operator= ( const MatrixType &  m)
inline

Copies the contents of the column vector m into *this.

Parameters
mThe column vector whose contents to copy into the current column vector.

Definition at line 4056 of file matrix.hpp.


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