The Vish Visualization Shell 0.3
Vish
Eagle::Column< R, value > Class Template Reference

A column vector. More...

#include <elementary/eagle/Matrix.hpp>

Inheritance diagram for Eagle::Column< R, value >:
Eagle::Matrix< R, 1, value > Eagle::Vector< value, R *C > Eagle::FixedArray< value, n >

Public Member Functions

constexpr Column ()
 Default constructor (no initialization!).
constexpr Column (const Column &A, const Operator<'-'> &Op)
 Computational constructor for unary minus.
constexpr Column (const Column< R, value > &r, const value &V, const Mult &)
 Computational constructor for scalar multiplicatoin.
template<class AType, class BType, OperatorID_t CompType>
constexpr Column (const FixedArray< AType, R > &l, const FixedArray< BType, R > &r, const Operator< CompType > &Op)
 Generic computational constructor for two arrays of size compatible with the column vector.
template<class ValueType, OperatorID_t CompType>
constexpr Column (const FixedArray< ValueType, R > &l, const Operator< CompType > &C, const value &scalar)
 Generic computational constructor for column/scalar operations.
template<class ValueType>
constexpr Column (const FixedArray< ValueType, R > &V)
 Explicit construction from compatible base type.
template<dimension_t C>
 Column (const Matrix< R, C, value > &A, const Column< C, value > &V)
 Multiply r (rows) by c (columns) matrix A on the left by column vector V of dimension c on the right to produce a (column) vector Y output of dimension r.
template<dimension_t C>
 Column (const Matrix< R, C, value > &M, int c)
 Construct column vector from some matrix column.
template<class ValueType, OperatorID_t CompType>
constexpr Column (const Operator< CompType > &C, const value &scalar, const FixedArray< ValueType, R > &l)
 Generic computational constructor for scalar/column operations.
constexpr Column (const Row< R, value > &r, const TransposeOperation &)
 Computational constructor for transpose operation.
constexpr Column (const std::array< value, R > &V)
 Explicit construction from compatible initializer list.
template<class Type>
constexpr Column (const std::initializer_list< Type > &V)
 Explicit construction from compatible initializer list.
constexpr value & operator[] (int i)
 Access element for writing.
constexpr const value & operator[] (int i) const
 Element access operation for reading.
Public Member Functions inherited from Eagle::Matrix< R, 1, value >
constexpr const Matrix_tmatrix () const
 yield matrix here, useful for derived classes.
constexpr const Matrix_tmatrix () const
 yield matrix here, useful for derived classes.
constexpr Matrix ()
 Default constructor.
constexpr Matrix (const Matrix &M)
 Copy constructor.
constexpr Matrix (const Base_t &V)
 Construct matrix from linear vector.
constexpr Matrix (const std::array< T, 16 > &Init)
 Construct matrix from initializer list.
constexpr Matrix ()
 Default constructor.
constexpr Matrix (const Matrix &M)
 Copy constructor.
constexpr Matrix (const Base_t &V)
 Construct matrix from linear vector.
constexpr Matrix (const std::array< T, 16 > &Init)
 Construct matrix from initializer list.
constexpr Matrix (const Matrix &A, const value &V, const Operator<' *'> &M)
 Computational constructor for multiplying matrix by scalar.
constexpr Matrix (const value &V, const Matrix &A, const Operator<' *'> &M)
 Computational constructor for multiplying scalar by matrix.
constexpr Matrix (const Matrix &A, const value &V, const Operator<'/'> &Op)
 Computational constructor for dividing matrix by scalar.
constexpr Matrix (const Matrix &A, const Matrix &B, const Operator<'+'> &Op)
 Computational constructor for matrix addition.
constexpr Matrix (const Matrix &A, const Matrix &B, const Operator<'-'> &Op)
 Computational constructor for matrix subtraction.
constexpr Matrix (const FixedArray< AType, R *C > &l, const FixedArray< BType, R *C > &r, const Operator< CompType > &Op)
 Generic computational constructor for two arrays of size compatible with the matrix.
constexpr Matrix (const FixedArray< Type, R *C > &Data)
 Explicit constructor from arbitrary compatible type.
constexpr Matrix (const FixedArray< ValueType, R > &l, const Operator< CompType > &Op, const value &scalar)
 Generic computational constructor for vector/scalar operations.
constexpr Matrix (const Operator< CompType > &Op, const value &scalar, const FixedArray< ValueType, R > &l)
 Generic computational constructor for scalar/vector operations.
constexpr Matrix (const Matrix &A, const Operator<'-'> &Op)
 Computational constructor for unary minus.
constexpr Matrix (const Matrix< R, M, ValueA > &A, const Matrix< M, C, ValueB > &B, const Operator<' *'> &)
 Matrix multiplication $ A B$.
constexpr Matrix (const Matrix< R, M, ValueA > &A, const Matrix< C, M, ValueB > &B, const Operator<' *','~'> &)
 Transposed matrix multiplication $ A B^{\tau}$.
constexpr Matrix (const Matrix< R, M, value > &A, const Matrix< C, M, value > &B, const Mult &, const TransposeOperation &)
 Matrix multiplication $ A B^t$ with transpose of matrix B.
constexpr Matrix (const Matrix< M, R, value > &A, const Matrix< M, C, value > &B, const TransposeOperation &, const Mult &)
 Matrix multiplication $ A^t B$ with transpose of matrix A.
constexpr Matrix (const Matrix< R, C, value > &A, const LowerTriangular< C, value > &B, const Mult &)
 Matrix multiplication $ A B$ where B is a symmetric matrix stored in lower triangular form.
constexpr Matrix (const Matrix< C, R, value > &A, const LowerTriangular< C, value > &B, const TransposeOperation &, const Mult &)
 Matrix multiplication $ A^t B$ where B is a symmetric matrix stored in lower triangular form.
constexpr const Column< R, value > & column (int i) const
 Return the ith column of this matrix.
constexpr Column< R, value > & column (int i)
 Return the ith column of this matrix, writeable.
constexpr value & operator() (dimension_t row, dimension_t column)
 Access element for writing.
constexpr const value & operator() (dimension_t row, dimension_t column) const
 Element access operation for reading.
constexpr Row_t row (dimension_t rowNr)
 Return writable reference to the ith row of this matrix.
constexpr const Row_t row (dimension_t rowNr) const
 Return read-only reference to the ith row of this matrix.
constexpr const auto operator[] (dimension_t r) const
 Allow nested access to matrix elements via bracket operator.
constexpr auto & operator[] (dimension_t r)
 Allow nested access to matrix elements via bracket operator.
constexpr Matrix (const Matrix &A, const value &V, const Operator<' *'> &M)
 Computational constructor for multiplying matrix by scalar.
constexpr Matrix (const value &V, const Matrix &A, const Operator<' *'> &M)
 Computational constructor for multiplying scalar by matrix.
constexpr Matrix (const Matrix &A, const value &V, const Operator<'/'> &Op)
 Computational constructor for dividing matrix by scalar.
constexpr Matrix (const Matrix &A, const Matrix &B, const Operator<'+'> &Op)
 Computational constructor for matrix addition.
constexpr Matrix (const Matrix &A, const Matrix &B, const Operator<'-'> &Op)
 Computational constructor for matrix subtraction.
constexpr Matrix (const FixedArray< AType, R *C > &l, const FixedArray< BType, R *C > &r, const Operator< CompType > &Op)
 Generic computational constructor for two arrays of size compatible with the matrix.
constexpr Matrix (const FixedArray< Type, R *C > &Data)
 Explicit constructor from arbitrary compatible type.
constexpr Matrix (const FixedArray< ValueType, R > &l, const Operator< CompType > &Op, const value &scalar)
 Generic computational constructor for vector/scalar operations.
constexpr Matrix (const Operator< CompType > &Op, const value &scalar, const FixedArray< ValueType, R > &l)
 Generic computational constructor for scalar/vector operations.
constexpr Matrix (const Matrix &A, const Operator<'-'> &Op)
 Computational constructor for unary minus.
constexpr Matrix (const Matrix< R, M, ValueA > &A, const Matrix< M, C, ValueB > &B, const Operator<' *'> &)
 Matrix multiplication $ A B$.
constexpr Matrix (const Matrix< R, M, ValueA > &A, const Matrix< C, M, ValueB > &B, const Operator<' *','~'> &)
 Transposed matrix multiplication $ A B^{\tau}$.
constexpr Matrix (const Matrix< R, M, value > &A, const Matrix< C, M, value > &B, const Mult &, const TransposeOperation &)
 Matrix multiplication $ A B^t$ with transpose of matrix B.
constexpr Matrix (const Matrix< M, R, value > &A, const Matrix< M, C, value > &B, const TransposeOperation &, const Mult &)
 Matrix multiplication $ A^t B$ with transpose of matrix A.
constexpr Matrix (const Matrix< R, C, value > &A, const LowerTriangular< C, value > &B, const Mult &)
 Matrix multiplication $ A B$ where B is a symmetric matrix stored in lower triangular form.
constexpr Matrix (const Matrix< C, R, value > &A, const LowerTriangular< C, value > &B, const TransposeOperation &, const Mult &)
 Matrix multiplication $ A^t B$ where B is a symmetric matrix stored in lower triangular form.
constexpr const Column< R, value > & column (int i) const
 Return the ith column of this matrix.
constexpr Column< R, value > & column (int i)
 Return the ith column of this matrix, writeable.
constexpr value & operator() (dimension_t row, dimension_t column)
 Access element for writing.
constexpr const value & operator() (dimension_t row, dimension_t column) const
 Element access operation for reading.
constexpr Row_t row (dimension_t rowNr)
 Return writable reference to the ith row of this matrix.
constexpr const Row_t row (dimension_t rowNr) const
 Return read-only reference to the ith row of this matrix.
constexpr const auto operator[] (dimension_t r) const
 Allow nested access to matrix elements via bracket operator.
constexpr auto & operator[] (dimension_t r)
 Allow nested access to matrix elements via bracket operator.
Public Member Functions inherited from Eagle::Vector< value, R *C >
Base_t & fixed_array ()
 Provide access to the base class, writable.
Vectoroperator*= (const value &value)
 Self-multiplication.
Vectoroperator+= (const Vector &v)
 Self-addition.
Vectoroperator-= (const Vector &v)
 Self-subtraction.
Vectoroperator/= (const value &value)
 Self-division.
Vectoroperator= (const Vector &src)
 Assignment operator.
void set (const V &value)
 Assign all values to the same scalar.
constexpr Vector ()
 Default constructor.
Public Member Functions inherited from Eagle::FixedArray< value, n >
void expandMinMax (FixedArray &MinValues, FixedArray &MaxValues) const
 Expand a range given by MinValues,MaxValues to include the values of this array, done per component.
constexpr FixedArray () noexcept
 Default constructor.
constexpr value & get (int i)
 writable element access
constexpr const FixedArray< value, subsize > * get_subarray () const
 Helper class for retrieve a subset of the current array.
constexpr const FixedArray< value, SIZE-1 > & get_subdim () const
 Mainly introduced because of Interpolate::operator[].
const FixedArray_tgetFixedArray () const noexcept
 convenience function for base classes
constexpr value getMax () const
 Compute the maximum element value of this array.
constexpr value getMin () const
 Compute the maximum element value of this array.
constexpr bool operator!= (const FixedArray< T, N > &F) const
 Compare two arrays.
constexpr bool operator== (const FixedArray< T, N > &F) const
 Compare two arrays.
constexpr value & operator[] (int i)
 writeable element access operator
constexpr value * ptr (int i=0) noexcept
 Return a pointer to the ith element, no range checking.
constexpr void set (const Value &x)
 Set all array elements to the same value.
void setFromArray (const value *x, int length=SIZE, int offset=0)
 Set all array elements to an array's element value.
void sort (FixedArray< int, N > &I) const
 Sort the elements of an array into the index array.

(Note that these are not member symbols.)

template<int R, int C, class value>
Column< R, value > operator* (const Matrix< R, C, value > &A, const Column< C, value > &V)
 Multiply r (rows) by c (columns) matrix A on the left by column vector V of dimension c on the right to produce a (column) vector C output of dimension r.

Additional Inherited Members

Public Types inherited from Eagle::Matrix< R, 1, value >
using Matrix_t
 Matrix type.
typedef Operator<' *'> Mult
 Computational constructor argument for multiplicative operations.
typedef Operator<'~'> TransposeOperation
 Computational constructor argument for transpose operations.
Public Types inherited from Eagle::Vector< value, R *C >
enum  
 The number of elements in this array.
Public Types inherited from Eagle::FixedArray< value, n >
typedef FlattenedArray_t::value_type Element_t
 The maximally reduced type of elements stored here.
typedef GetFixedArrayType< value >::result_t ElementAsFixedArray_t
 Element type as fixed array, if it is convertible to a fixed array.
typedef FixedArray FixedArray_t
 Exporting the type definition of this array cass type.
typedef FixedArrayFlattener< FixedArrayOfElements_tFixedArrayFlattener_t
 Internal helper class.
typedef FixedArray< ElementAsFixedArray_t, N > FixedArrayOfElements_t
 If the value is derived from a fixed array type itself, then the FixedArrayOfElements_t is an FixedArray<FixedArray<>> type.
typedef FixedArrayFlattener_t::result_t FlattenedArray_t
 Reduction of this array type, if it is nested, to an flattened type which contains elementary types.
typedef value value_type
 Export the type of the respective element value type.
Static Public Member Functions inherited from Eagle::FixedArray< value, n >
static constexpr FixedArray convert (const FixedArray< T, N > &F, const ConversionFunctor &CF)
 Perform a type conversion on a given fixed array into another basis type:
static constexpr dimension_t size ()
 The number of elements here.
Protected Attributes inherited from Eagle::FixedArray< value, n >
value data [SIZE]
 The actual data values, intentional no-initialization for data member, which increases performance on vector creation.

Detailed Description

template<dimension_t R, class value>
class Eagle::Column< R, value >

A column vector.

     (1)
     (2)
     (3)
    
See also
Row, Matrix

Constructor & Destructor Documentation

◆ Column() [1/2]

template<dimension_t R, class value>
template<dimension_t C>
Eagle::Column< R, value >::Column ( const Matrix< R, C, value > & A,
const Column< C, value > & V )
inline

Multiply r (rows) by c (columns) matrix A on the left by column vector V of dimension c on the right to produce a (column) vector Y output of dimension r.

this = A * V c = M*c

                 (1)
                 (2)
                 (3)
          (1 2 3)        (13)
          (4 5 6)        (32)

References Column(), Eagle::Matrix< R, 1, value >::Matrix(), and Eagle::FixedArray< value, n >::ptr().

◆ Column() [2/2]

template<dimension_t R, class value>
template<dimension_t C>
Eagle::Column< R, value >::Column ( const Matrix< R, C, value > & M,
int c )
inline

Construct column vector from some matrix column.

Parameters
MThe Matrix
cThe selected column