JEMRIS  2.8.1
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 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 size_t * Dims () const
 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

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

Access to data.

Returns
Reference to data

+ Here is the caller graph for this function:

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

Dimensions.

Returns
Dimensions of the ensemble
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:

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
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
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
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:

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.
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:

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
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
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

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

Actual serialized data (Data is stored column-major)

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

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

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 17.06.2016 | Tony Stoecker | Imprint --