Loading...
Searching...
No Matches
RowVector< Cmpt > Class Template Reference

Templated 3D row-vector derived from MatrixSpace adding construction from 3 components and element access using x(), y() and z(). More...

#include <RowVector.H>

Inheritance diagram for RowVector< Cmpt >:
Collaboration diagram for RowVector< Cmpt >:

Public Types

enum  components { X , Y , Z }
 Component labeling enumeration. More...
typedef RowVector< label > labelType
 Equivalent type of labels used for valid component indexing.
Public Types inherited from MatrixSpace< RowVector< Cmpt >, Cmpt, 1, 3 >
typedef MatrixSpace< RowVector< Cmpt >, Cmpt, Mrows, Ncols > msType
 MatrixSpace type.
Public Types inherited from VectorSpace< RowVector< Cmpt >, Cmpt, Mrows *Ncols >
typedef VectorSpace< RowVector< Cmpt >, Cmpt, Ncmpts > vsType
 VectorSpace type.
typedef Cmpt cmptType
 Component type.
typedef Cmpt magType
 Magnitude type.
typedef direction size_type
 The type to represent the size of a VectorSpace.
typedef Cmpt * iterator
 Random access iterator for traversing VectorSpace.
typedef const Cmpt * const_iterator
 Random access iterator for traversing VectorSpace.

Public Member Functions

 RowVector ()=default
 Default construct.
 RowVector (const Foam::zero)
 Construct initialized to zero.
template<class Cmpt2>
 RowVector (const MatrixSpace< RowVector< Cmpt2 >, Cmpt2, 1, 3 > &)
 Construct given VectorSpace of the same rank.
 RowVector (const Cmpt &rvx, const Cmpt &rvy, const Cmpt &rvz)
 Construct given three components.
 RowVector (Istream &)
 Construct from Istream.
const Cmpt & x () const noexcept
const Cmpt & y () const noexcept
const Cmpt & z () const noexcept
Cmpt & x () noexcept
Cmpt & y () noexcept
Cmpt & z () noexcept
Public Member Functions inherited from MatrixSpace< RowVector< Cmpt >, Cmpt, 1, 3 >
Foam::MatrixSpace< RowVector< Cmpt >, Cmpt, Mrows, Ncols >::template ConstBlock< SubTensor, BRowStart, BColStart > block () const
Foam::MatrixSpace< RowVector< Cmpt >, Cmpt, Mrows, Ncols >::template Block< SubTensor, BRowStart, BColStart > block ()
 MatrixSpace ()=default
 Default construct.
const Cmpt & elmt () const noexcept
 Fast const element access using compile-time addressing.
const Cmpt & xx () const noexcept
const Cmpt & xy () const noexcept
const Cmpt & xz () const noexcept
const Cmpt & yx () const noexcept
const Cmpt & yy () const noexcept
const Cmpt & yz () const noexcept
const Cmpt & zx () const noexcept
const Cmpt & zy () const noexcept
const Cmpt & zz () const noexcept
typeOfTranspose< Cmpt, RowVector< Cmpt > >::type T () const
 Return the transpose of the matrix.
const Cmpt & operator() (const direction i, const direction j) const
 (i, j) const element access operator
void operator= (Foam::zero)
 Assignment to zero.
void operator&= (const MatrixSpace< RowVector< Cmpt >, Cmpt, Ncols, Ncols > &matrix)
 Inner product with a compatible square matrix.
Public Member Functions inherited from VectorSpace< RowVector< Cmpt >, Cmpt, Mrows *Ncols >
const Foam::VectorSpace< RowVector< Cmpt >, Cmpt, Ncmpts >::template ConstBlock< SubVector, BStart > block () const
 VectorSpace ()=default
 Default construct.
const Cmpt & component (const direction) const
void replace (const direction, const Cmpt &)
const Cmpt * cdata () const noexcept
 Return const pointer to the first data element.
Cmpt * data () noexcept
 Return pointer to the first data element.
void fill (const Cmpt &s)
 Assign all components to given value.
const Cmpt & operator[] (const direction) const
void operator= (const VectorSpace< RowVector< Cmpt >, Cmpt, Ncmpts > &)
void operator+= (const VectorSpace< RowVector< Cmpt >, Cmpt, Ncmpts > &)
void operator-= (const VectorSpace< RowVector< Cmpt >, Cmpt, Ncmpts > &)
void operator*= (const scalar)
void operator/= (const scalar)
iterator begin () noexcept
 Return an iterator (pointer) to begin of VectorSpace.
const_iterator cbegin () const noexcept
 Return const_iterator (const pointer) to begin of VectorSpace.
iterator end () noexcept
 Return an iterator (pointer) to end of VectorSpace.
const_iterator cend () const noexcept
 Return const_iterator (const pointer) to end of VectorSpace.

Additional Inherited Members

Static Public Member Functions inherited from MatrixSpace< RowVector< Cmpt >, Cmpt, 1, 3 >
static direction m () noexcept
 The number of rows.
static direction n () noexcept
 The number of columns.
static msType identity ()
 An identity matrix for square matrix-spaces.
Static Public Member Functions inherited from VectorSpace< RowVector< Cmpt >, Cmpt, Mrows *Ncols >
static constexpr direction size () noexcept
 The number of elements in the VectorSpace = Ncmpts.
static RowVector< Cmpt > uniform (const Cmpt &s)
 Return a VectorSpace with all elements = s.
Public Attributes inherited from VectorSpace< RowVector< Cmpt >, Cmpt, Mrows *Ncols >
Cmpt v_ [Ncmpts]
 The components of this vector space.
Static Public Attributes inherited from MatrixSpace< RowVector< Cmpt >, Cmpt, 1, 3 >
static constexpr direction mRows
static constexpr direction nCols
Static Public Attributes inherited from VectorSpace< RowVector< Cmpt >, Cmpt, Mrows *Ncols >
static constexpr direction dim
 Dimensionality of space.
static constexpr direction nComponents
 Number of components in this vector space.
static constexpr direction mRows
static constexpr direction nCols
static const char *const typeName
static const char *const componentNames []
static const RowVector< Cmpt > zero
static const RowVector< Cmpt > one
static const RowVector< Cmpt > max
static const RowVector< Cmpt > min
static const RowVector< Cmpt > rootMax
static const RowVector< Cmpt > rootMin

Detailed Description

template<class Cmpt>
class Foam::RowVector< Cmpt >

Templated 3D row-vector derived from MatrixSpace adding construction from 3 components and element access using x(), y() and z().

Source files

Definition at line 49 of file RowVector.H.

Member Typedef Documentation

◆ labelType

template<class Cmpt>
typedef RowVector<label> labelType

Equivalent type of labels used for valid component indexing.

Definition at line 59 of file RowVector.H.

Member Enumeration Documentation

◆ components

template<class Cmpt>
enum components

Component labeling enumeration.

Enumerator

Definition at line 65 of file RowVector.H.

Constructor & Destructor Documentation

◆ RowVector() [1/5]

template<class Cmpt>
RowVector ( )
default

Default construct.

Referenced by RowVector(), RowVector(), and RowVector().

Here is the caller graph for this function:

◆ RowVector() [2/5]

template<class Cmpt>
RowVector ( const Foam::zero )
inline

Construct initialized to zero.

Definition at line 24 of file RowVectorI.H.

References RowVector(), and Foam::Zero.

Here is the call graph for this function:

◆ RowVector() [3/5]

template<class Cmpt>
template<class Cmpt2>
RowVector ( const MatrixSpace< RowVector< Cmpt2 >, Cmpt2, 1, 3 > & ms)
inline

Construct given VectorSpace of the same rank.

Definition at line 32 of file RowVectorI.H.

References MatrixSpace< RowVector< Cmpt >, Cmpt, 1, 3 >::MatrixSpace(), and RowVector().

Here is the call graph for this function:

◆ RowVector() [4/5]

template<class Cmpt>
RowVector ( const Cmpt & rvx,
const Cmpt & rvy,
const Cmpt & rvz )
inline

Construct given three components.

Definition at line 42 of file RowVectorI.H.

References VectorSpace< RowVector< Cmpt >, Cmpt, Mrows *Ncols >::v_, X, Y, and Z.

◆ RowVector() [5/5]

template<class Cmpt>
RowVector ( Istream & is)
inlineexplicit

Construct from Istream.

Definition at line 56 of file RowVectorI.H.

References RowVector().

Here is the call graph for this function:

Member Function Documentation

◆ x() [1/2]

template<class Cmpt>
const Cmpt & x ( ) const
inlinenoexcept

Definition at line 101 of file RowVector.H.

◆ y() [1/2]

template<class Cmpt>
const Cmpt & y ( ) const
inlinenoexcept

Definition at line 102 of file RowVector.H.

◆ z() [1/2]

template<class Cmpt>
const Cmpt & z ( ) const
inlinenoexcept

Definition at line 103 of file RowVector.H.

◆ x() [2/2]

template<class Cmpt>
Cmpt & x ( )
inlinenoexcept

Definition at line 105 of file RowVector.H.

◆ y() [2/2]

template<class Cmpt>
Cmpt & y ( )
inlinenoexcept

Definition at line 106 of file RowVector.H.

◆ z() [2/2]

template<class Cmpt>
Cmpt & z ( )
inlinenoexcept

Definition at line 107 of file RowVector.H.


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