vSMC  v3.0.0
Scalable Monte Carlo
Classes | Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
vsmc::StateMatrixBase< Layout, Dim, T > Class Template Reference

Base type of StateMatrix. More...

#include <vsmc/core/state_matrix.hpp>

Classes

class  single_particle_type
 

Public Types

using pack_type = Vector< T >
 
using size_type = std::size_t
 
using value_type = T
 

Public Member Functions

value_typedata ()
 
const value_typedata () const
 
void reserve (size_type N)
 Reserve space for specified number of particles. More...
 
void reserve (size_type N, std::size_t dim)
 Reserve space for specified number of particles and dimensions. More...
 
void shrink_to_fit ()
 
size_type size () const
 The numbrer of particles. More...
 
void swap (StateMatrixBase< Layout, Dim, T > &other) noexcept
 

Protected Member Functions

 StateMatrixBase (size_type N)
 
 StateMatrixBase (size_type N, std::size_t dim)
 
 StateMatrixBase (const StateMatrixBase< Layout, Dim, T > &)=default
 
 StateMatrixBase (StateMatrixBase< Layout, Dim, T > &&)=default
 
std::size_t data_size () const
 
StateMatrixBase< Layout, Dim, T > & operator= (const StateMatrixBase< Layout, Dim, T > &)=default
 
StateMatrixBase< Layout, Dim, T > & operator= (StateMatrixBase< Layout, Dim, T > &&other) noexcept
 
void resize_data (size_type N, std::size_t dim)
 
- Protected Member Functions inherited from vsmc::internal::StateMatrixDim< Dim >
void swap (StateMatrixDim< Dim > &) noexcept
 

Friends

bool operator!= (const StateMatrixBase< Layout, Dim, T > &state1, const StateMatrixBase< Layout, Dim, T > &state2)
 
bool operator== (const StateMatrixBase< Layout, Dim, T > &state1, const StateMatrixBase< Layout, Dim, T > &state2)
 

Additional Inherited Members

- Static Public Member Functions inherited from vsmc::internal::StateMatrixDim< Dim >
static constexpr std::size_t dim ()
 
- Static Protected Member Functions inherited from vsmc::internal::StateMatrixDim< Dim >
static void set_dim (std::size_t)
 

Detailed Description

template<MatrixLayout Layout, std::size_t Dim, typename T>
class vsmc::StateMatrixBase< Layout, Dim, T >

Base type of StateMatrix.

Definition at line 85 of file state_matrix.hpp.

Member Typedef Documentation

template<MatrixLayout Layout, std::size_t Dim, typename T>
using vsmc::StateMatrixBase< Layout, Dim, T >::pack_type = Vector<T>

Definition at line 90 of file state_matrix.hpp.

template<MatrixLayout Layout, std::size_t Dim, typename T>
using vsmc::StateMatrixBase< Layout, Dim, T >::size_type = std::size_t

Definition at line 88 of file state_matrix.hpp.

template<MatrixLayout Layout, std::size_t Dim, typename T>
using vsmc::StateMatrixBase< Layout, Dim, T >::value_type = T

Definition at line 89 of file state_matrix.hpp.

Constructor & Destructor Documentation

template<MatrixLayout Layout, std::size_t Dim, typename T>
vsmc::StateMatrixBase< Layout, Dim, T >::StateMatrixBase ( size_type  N)
inlineexplicitprotected

Definition at line 140 of file state_matrix.hpp.

template<MatrixLayout Layout, std::size_t Dim, typename T>
vsmc::StateMatrixBase< Layout, Dim, T >::StateMatrixBase ( size_type  N,
std::size_t  dim 
)
inlineprotected

Definition at line 142 of file state_matrix.hpp.

template<MatrixLayout Layout, std::size_t Dim, typename T>
vsmc::StateMatrixBase< Layout, Dim, T >::StateMatrixBase ( const StateMatrixBase< Layout, Dim, T > &  )
protecteddefault
template<MatrixLayout Layout, std::size_t Dim, typename T>
vsmc::StateMatrixBase< Layout, Dim, T >::StateMatrixBase ( StateMatrixBase< Layout, Dim, T > &&  )
protecteddefault

Member Function Documentation

template<MatrixLayout Layout, std::size_t Dim, typename T>
value_type* vsmc::StateMatrixBase< Layout, Dim, T >::data ( )
inline

Definition at line 128 of file state_matrix.hpp.

template<MatrixLayout Layout, std::size_t Dim, typename T>
const value_type* vsmc::StateMatrixBase< Layout, Dim, T >::data ( ) const
inline

Definition at line 130 of file state_matrix.hpp.

template<MatrixLayout Layout, std::size_t Dim, typename T>
std::size_t vsmc::StateMatrixBase< Layout, Dim, T >::data_size ( ) const
inlineprotected

Definition at line 171 of file state_matrix.hpp.

template<MatrixLayout Layout, std::size_t Dim, typename T>
StateMatrixBase<Layout, Dim, T>& vsmc::StateMatrixBase< Layout, Dim, T >::operator= ( const StateMatrixBase< Layout, Dim, T > &  )
protecteddefault
template<MatrixLayout Layout, std::size_t Dim, typename T>
StateMatrixBase<Layout, Dim, T>& vsmc::StateMatrixBase< Layout, Dim, T >::operator= ( StateMatrixBase< Layout, Dim, T > &&  other)
inlineprotectednoexcept

Definition at line 156 of file state_matrix.hpp.

template<MatrixLayout Layout, std::size_t Dim, typename T>
void vsmc::StateMatrixBase< Layout, Dim, T >::reserve ( size_type  N)
inline

Reserve space for specified number of particles.

Definition at line 115 of file state_matrix.hpp.

template<MatrixLayout Layout, std::size_t Dim, typename T>
void vsmc::StateMatrixBase< Layout, Dim, T >::reserve ( size_type  N,
std::size_t  dim 
)
inline

Reserve space for specified number of particles and dimensions.

dim is ignored if Dim > 0.

Definition at line 121 of file state_matrix.hpp.

template<MatrixLayout Layout, std::size_t Dim, typename T>
void vsmc::StateMatrixBase< Layout, Dim, T >::resize_data ( size_type  N,
std::size_t  dim 
)
inlineprotected

Definition at line 164 of file state_matrix.hpp.

template<MatrixLayout Layout, std::size_t Dim, typename T>
void vsmc::StateMatrixBase< Layout, Dim, T >::shrink_to_fit ( )
inline

Definition at line 126 of file state_matrix.hpp.

template<MatrixLayout Layout, std::size_t Dim, typename T>
size_type vsmc::StateMatrixBase< Layout, Dim, T >::size ( ) const
inline

The numbrer of particles.

Definition at line 112 of file state_matrix.hpp.

template<MatrixLayout Layout, std::size_t Dim, typename T>
void vsmc::StateMatrixBase< Layout, Dim, T >::swap ( StateMatrixBase< Layout, Dim, T > &  other)
inlinenoexcept

Definition at line 132 of file state_matrix.hpp.

Friends And Related Function Documentation

template<MatrixLayout Layout, std::size_t Dim, typename T>
bool operator!= ( const StateMatrixBase< Layout, Dim, T > &  state1,
const StateMatrixBase< Layout, Dim, T > &  state2 
)
friend

Definition at line 185 of file state_matrix.hpp.

template<MatrixLayout Layout, std::size_t Dim, typename T>
bool operator== ( const StateMatrixBase< Layout, Dim, T > &  state1,
const StateMatrixBase< Layout, Dim, T > &  state2 
)
friend

Definition at line 173 of file state_matrix.hpp.