linear-library
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
LinearAlgebra::VectorMatrix< T > Class Template Reference

Examples: More...

#include <VectorMatrix.hpp>

Public Member Functions

 VectorMatrix (int rows, int cols)
 
 VectorMatrix (const std::vector< std::vector< T > > &v)
 
 VectorMatrix (std::vector< std::vector< T > > &&v)
 
void validation ()
 
 VectorMatrix ()
 
 ~VectorMatrix ()=default
 
VectorMatrix< Toperator* (const VectorMatrix< T > &B) const
 Matrix multiplication A*B where: A is matrix of VectorMatrix type B is matrix of VectorMatrix type.
 
VectorMatrix< Toperator* (T number) const
 Scalar multiplication A*a where: A is matrix of VectorMatrix type a is number of type that set in template.
 
Toperator() (int i, int j)
 
const Toperator() (int i, int j) const
 
std::vector< T > & operator[] (int i)
 
const std::vector< T > & operator[] (int i) const
 Return row of matrix.
 
int getRows () const
 return count rows
 
int getColumns () const
 return count columns
 
const std::vector< std::vector< T > > & getMatrix () const
 
std::vector< std::vector< T > > & getMatrix ()
 
VectorMatrix< Toperator! () const
 Transponse matrix.
 

Friends

template<typename U >
std::ostream & operator<< (std::ostream &os, const VectorMatrix< U > &M)
 

Detailed Description

template<typename T>
class LinearAlgebra::VectorMatrix< T >

Examples:

{1,2,3},
{4,5,6},
{7,8,9}
});
{11,12,13},
{14,15,16},
{17,18,19}
});
auto C = A*3;
auto D = A*B;
auto E = !A
std::cout<<A;
Examples:
Definition VectorMatrix.hpp:32
VectorMatrix()
Definition VectorMatrix.hpp:61

Constructor & Destructor Documentation

◆ VectorMatrix() [1/4]

template<typename T >
LinearAlgebra::VectorMatrix< T >::VectorMatrix ( int  rows,
int  cols 
)
inline

◆ VectorMatrix() [2/4]

template<typename T >
LinearAlgebra::VectorMatrix< T >::VectorMatrix ( const std::vector< std::vector< T > > &  v)
inline

◆ VectorMatrix() [3/4]

template<typename T >
LinearAlgebra::VectorMatrix< T >::VectorMatrix ( std::vector< std::vector< T > > &&  v)
inline

◆ VectorMatrix() [4/4]

template<typename T >
LinearAlgebra::VectorMatrix< T >::VectorMatrix ( )
inline

◆ ~VectorMatrix()

template<typename T >
LinearAlgebra::VectorMatrix< T >::~VectorMatrix ( )
default

Member Function Documentation

◆ getColumns()

template<typename T >
int LinearAlgebra::VectorMatrix< T >::getColumns ( ) const
inline

return count columns

◆ getMatrix() [1/2]

template<typename T >
std::vector< std::vector< T > > & LinearAlgebra::VectorMatrix< T >::getMatrix ( )
inline

◆ getMatrix() [2/2]

template<typename T >
const std::vector< std::vector< T > > & LinearAlgebra::VectorMatrix< T >::getMatrix ( ) const
inline

◆ getRows()

template<typename T >
int LinearAlgebra::VectorMatrix< T >::getRows ( ) const
inline

return count rows

Returns

◆ operator!()

template<typename T >
LinearAlgebra::VectorMatrix< T > LinearAlgebra::VectorMatrix< T >::operator! ( ) const

Transponse matrix.

A = [[1,2,3], At = [[1,4,7]
[4,5,6], => [2,5,8],
[7,8,9]] [9,6,3]]

◆ operator()() [1/2]

template<typename T >
T & LinearAlgebra::VectorMatrix< T >::operator() ( int  i,
int  j 
)
inline

◆ operator()() [2/2]

template<typename T >
const T & LinearAlgebra::VectorMatrix< T >::operator() ( int  i,
int  j 
) const
inline

◆ operator*() [1/2]

Matrix multiplication A*B where: A is matrix of VectorMatrix type B is matrix of VectorMatrix type.

◆ operator*() [2/2]

Scalar multiplication A*a where: A is matrix of VectorMatrix type a is number of type that set in template.

◆ operator[]() [1/2]

template<typename T >
std::vector< T > & LinearAlgebra::VectorMatrix< T >::operator[] ( int  i)
inline

◆ operator[]() [2/2]

template<typename T >
const std::vector< T > & LinearAlgebra::VectorMatrix< T >::operator[] ( int  i) const
inline

Return row of matrix.

A = [
[1,2],
[3,4]
]
A[0] return row under index 0: [1,2]

◆ validation()

template<typename T >
void LinearAlgebra::VectorMatrix< T >::validation ( )
inline

Friends And Related Symbol Documentation

◆ operator<<

template<typename T >
template<typename U >
std::ostream & operator<< ( std::ostream &  os,
const VectorMatrix< U > &  M 
)
friend

Print matrix


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