Public Member Functions | List of all members
DiagonalMatrix< Type > Class Template Reference

A templated (N x N) diagonal matrix of objects of <Type>, effectively containing N elements, derived from List. More...

Inheritance diagram for DiagonalMatrix< Type >:
Inheritance graph
[legend]
Collaboration diagram for DiagonalMatrix< Type >:
Collaboration graph
[legend]

Public Member Functions

 DiagonalMatrix ()=default
 
 DiagonalMatrix (const DiagonalMatrix &)=default
 
DiagonalMatrixoperator= (const DiagonalMatrix &)=default
 
 DiagonalMatrix (const label n)
 
 DiagonalMatrix (const label n, const Foam::zero)
 
 DiagonalMatrix (const label n, const Type &val)
 
template<class Form >
 DiagonalMatrix (const Matrix< Form, Type > &mat)
 
void invert ()
 
template<class CompOp >
List< label > sortPermutation (CompOp &compare) const
 
void applyPermutation (const List< label > &p)
 
template<class CompOp >
Foam::List< Foam::label > sortPermutation (CompOp &compare) const
 
- Public Member Functions inherited from List< Type >
constexpr List () noexcept
 
 List (const label len)
 
 List (const label len, const T &val)
 
 List (const label len, const Foam::zero)
 
 List (const Foam::one, const T &val)
 
 List (const Foam::one, T &&val)
 
 List (const Foam::one, const Foam::zero)
 
 List (const List< T > &a)
 
 List (const UList< T > &a)
 
 List (List< T > &a, bool reuse)
 
 List (const UList< T > &list, const labelUList &indices)
 
 List (const UList< T > &list, const FixedList< label, N > &indices)
 
 List (const FixedList< T, N > &list)
 
 List (const PtrList< T > &list)
 
 List (const SLList< T > &list)
 
 List (const IndirectListBase< T, Addr > &list)
 
 List (std::initializer_list< T > list)
 
 List (List< T > &&list)
 
 List (DynamicList< T, SizeMin > &&list)
 
 List (SortableList< T > &&list)
 
 List (SLList< T > &&list)
 
 List (Istream &is)
 
 List (const label len)
 
 List (const label len, const T &val)
 
 List (const label len, const Foam::zero)
 
 List (const Foam::one, const T &val)
 
 List (const Foam::one, T &&val)
 
 List (const Foam::one, const Foam::zero)
 
 List (const UList< T > &a)
 
 List (const List< T > &a)
 
 List (List< T > &a, bool reuse)
 
 List (const UList< T > &list, const labelUList &indices)
 
 List (const PtrList< T > &list)
 
 List (const SLList< T > &list)
 
 List (std::initializer_list< T > list)
 
 List (List< T > &&list)
 
 List (SortableList< T > &&list)
 
 List (SLList< T > &&list)
 
constexpr List () noexcept
 
 List (Istream &is)
 
autoPtr< List< T > > clone () const
 
 ~List ()
 
void clear ()
 
void resize (const label len)
 
void resize (const label len, const T &val)
 
void resize (const label newLen)
 
void resize_nocopy (const label len)
 
void setSize (const label n)
 
void setSize (const label n, const T &val)
 
void append (const T &val)
 
void append (T &&val)
 
void append (const UList< T > &list)
 
void append (const IndirectListBase< T, Addr > &list)
 
void append (const T &val)
 
void append (T &&val)
 
void append (const UList< T > &list)
 
label appendUniq (const T &val)
 
void transfer (List< T > &list)
 
void transfer (DynamicList< T, SizeMin > &list)
 
void transfer (SortableList< T > &list)
 
void transfer (List< T > &list)
 
void transfer (SortableList< T > &list)
 
TnewElmt (const label i)
 
void operator= (const UList< T > &a)
 
void operator= (const List< T > &list)
 
void operator= (const SLList< T > &list)
 
void operator= (const IndirectListBase< T, Addr > &list)
 
void operator= (const FixedList< T, N > &list)
 
void operator= (std::initializer_list< T > list)
 
void operator= (const T &val)
 
void operator= (const Foam::zero)
 
void operator= (List< T > &&list)
 
void operator= (DynamicList< T, SizeMin > &&list)
 
void operator= (SortableList< T > &&list)
 
void operator= (SLList< T > &&list)
 
void operator= (const UList< T > &a)
 
void operator= (const List< T > &list)
 
void operator= (const SLList< T > &list)
 
void operator= (std::initializer_list< T > list)
 
void operator= (List< T > &&list)
 
void operator= (SortableList< T > &&list)
 
void operator= (SLList< T > &&list)
 
void operator= (const T &val)
 
void operator= (const Foam::zero)
 
IstreamreadList (Istream &is)
 
IstreamreadList (Istream &is)
 
IstreamreadList (Istream &is)
 
void shallowCopy (const UList< T > &)=delete
 
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type set (const label i, bool val=true)
 

Additional Inherited Members

- Public Types inherited from List< Type >
typedef SubList< TsubList
 
- Static Public Member Functions inherited from List< Type >
static const List< T > & null ()
 

Detailed Description

template<class Type>
class Foam::DiagonalMatrix< Type >

A templated (N x N) diagonal matrix of objects of <Type>, effectively containing N elements, derived from List.

See also
Test-DiagonalMatrix.C
Source files

Definition at line 56 of file DiagonalMatrix.H.

Constructor & Destructor Documentation

◆ DiagonalMatrix() [1/6]

DiagonalMatrix ( )
default

◆ DiagonalMatrix() [2/6]

DiagonalMatrix ( const DiagonalMatrix< Type > &  )
default

◆ DiagonalMatrix() [3/6]

DiagonalMatrix ( const label  n)
explicit

Definition at line 27 of file DiagonalMatrix.C.

◆ DiagonalMatrix() [4/6]

DiagonalMatrix ( const label  n,
const Foam::zero   
)

Definition at line 34 of file DiagonalMatrix.C.

◆ DiagonalMatrix() [5/6]

DiagonalMatrix ( const label  n,
const Type &  val 
)

Definition at line 41 of file DiagonalMatrix.C.

◆ DiagonalMatrix() [6/6]

DiagonalMatrix ( const Matrix< Form, Type > &  mat)

Definition at line 49 of file DiagonalMatrix.C.

Member Function Documentation

◆ operator=()

DiagonalMatrix& operator= ( const DiagonalMatrix< Type > &  )
default

◆ invert()

void invert

Definition at line 66 of file DiagonalMatrix.C.

◆ sortPermutation() [1/2]

List<label> sortPermutation ( CompOp &  compare) const

◆ applyPermutation()

void applyPermutation ( const List< label > &  p)

Definition at line 103 of file DiagonalMatrix.C.

◆ sortPermutation() [2/2]

Foam::List<Foam::label> sortPermutation ( CompOp &  compare) const

Definition at line 85 of file DiagonalMatrix.C.


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