JEMRIS  2.8.2
open-source MRI simulations
List of all members | Public Member Functions | Public Attributes
Ensemble< T > Struct Template Reference

Spin ensemble. More...

#include <Sample.h>

+ Inheritance diagram for Ensemble< T >:

Public Member Functions

 Ensemble ()
 Construct.
 
 ~Ensemble ()
 Destruct.
 
size_t Size () const
 Number of raw data elements. More...
 
size_t NSpins () const
 Number of spins in data store. More...
 
size_t NProps () const
 Innermost data dimension containing physical parameters of every isochromat. More...
 
size_t & NProps ()
 Reference to innermost data dimensions. More...
 
void Clear ()
 Clear data store and dimensions.
 
void ClearData ()
 Clear data store and dimensions.
 
void ResizeDims (const size_t ndim)
 Clear data store and dimensions.
 
void Init (const size_t ndim, const size_t *dims, const size_t live)
 Initialize data store with dimensions and number of non-zero spins. More...
 
void Init (const std::vector< size_t > &dims, const size_t live)
 Initialize data store with dimensions and number of non-zero spins. More...
 
void Allocate ()
 Allocate RAM.
 
void Zero ()
 Zero data.
 
void Init (const size_t live)
 Initialize data store number of non-zero spins only (MPI slaves) More...
 
void Init (const size_t nprops, const size_t live)
 Initialize data store number of non-zero spins only (MPI slaves) More...
 
const vector< size_t > Dims () const
 get Dimensions More...
 
void SetDims (vector< size_t > d)
 set Dimensions More...
 
T & operator[] (const size_t pos)
 Access to position in store. More...
 
operator[] (size_t pos) const
 Access to position in store. More...
 
T * Data ()
 Access to data. More...
 
std::vector< T >::iterator At (const size_t n)
 
std::vector< T >::const_iterator At (const size_t n) const
 

Public Attributes

std::vector< size_t > m_dims
 
std::vector< T > m_data
 
size_t m_nspins
 

Detailed Description

template<class T = double>
struct Ensemble< T >

Spin ensemble.

Member Function Documentation

§ Data()

template<class T = double>
T* Ensemble< T >::Data ( )
inline

Access to data.

Returns
Reference to data
+ Here is the caller graph for this function:

§ Dims()

template<class T = double>
const vector<size_t> Ensemble< T >::Dims ( ) const
inline

get Dimensions

Returns
get Dimensions of the ensemble

§ Init() [1/4]

template<class T = double>
void Ensemble< T >::Init ( const size_t  ndim,
const size_t *  dims,
const size_t  live 
)
inline

Initialize data store with dimensions and number of non-zero spins.

Parameters
ndimNumber of dimensions
dimsActual dimensions
liveLive (non-zero) spins
+ Here is the caller graph for this function:

§ Init() [2/4]

template<class T = double>
void Ensemble< T >::Init ( const std::vector< size_t > &  dims,
const size_t  live 
)
inline

Initialize data store with dimensions and number of non-zero spins.

Parameters
ndimNumber of dimensions
dimsActual dimensions
liveLive (non-zero) spins

§ Init() [3/4]

template<class T = double>
void Ensemble< T >::Init ( const size_t  live)
inline

Initialize data store number of non-zero spins only (MPI slaves)

Parameters
liveLive (non-zero) spins

§ Init() [4/4]

template<class T = double>
void Ensemble< T >::Init ( const size_t  nprops,
const size_t  live 
)
inline

Initialize data store number of non-zero spins only (MPI slaves)

Parameters
liveLive (non-zero) spins

§ NProps() [1/2]

template<class T = double>
size_t Ensemble< T >::NProps ( ) const
inline

Innermost data dimension containing physical parameters of every isochromat.

Returns
Number of physical and spatial properties of every spin
+ Here is the caller graph for this function:

§ NProps() [2/2]

template<class T = double>
size_t& Ensemble< T >::NProps ( )
inline

Reference to innermost data dimensions.

Returns
Reference to number of physical and spatial properties of every spin.

§ NSpins()

template<class T = double>
size_t Ensemble< T >::NSpins ( ) const
inline

Number of spins in data store.

Returns
Number of spins in data store
+ Here is the caller graph for this function:

§ operator[]() [1/2]

template<class T = double>
T& Ensemble< T >::operator[] ( const size_t  pos)
inline

Access to position in store.

Parameters
posDesired position
Returns
Reference to pos-th value in the store

§ operator[]() [2/2]

template<class T = double>
T Ensemble< T >::operator[] ( size_t  pos) const
inline

Access to position in store.

Parameters
posDesired position
Returns
Reference to pos-th value in the store

§ SetDims()

template<class T = double>
void Ensemble< T >::SetDims ( vector< size_t >  d)
inline

set Dimensions

Parameters
setDimensions of the ensemble

§ Size()

template<class T = double>
size_t Ensemble< T >::Size ( ) const
inline

Number of raw data elements.

Returns
Number of elements in data store
+ Here is the caller graph for this function:

Member Data Documentation

§ m_data

template<class T = double>
std::vector<T> Ensemble< T >::m_data

Actual serialized data (Data is stored column-major)

§ m_dims

template<class T = double>
std::vector<size_t> Ensemble< T >::m_dims

Specific dimensions (arbitrary maximum to way too high limit of 256)

§ m_nspins

template<class T = double>
size_t Ensemble< T >::m_nspins

Live spins (i.e. Spins with M0 > 0)


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

-- last change 24.05.2018 | Tony Stoecker | Imprint | Data Protection --