NPL
Neurological Programs and Libraries
npl::MatMap Class Reference

#include <fmri_inference.h>

Public Member Functions

 MatMap ()
 default constructor no file is opened More...
 
 MatMap (std::string filename, size_t rows, size_t cols)
 Open an new file as a memory map. ANY OLD FILE WILL BE DELETED The file is always opened for writing and reading. Note the same file should not be simultaneously written two by two separate processes. More...
 
 MatMap (std::string filename, bool writeable=false)
 Open an existing file as a memory map. The file must already exist. If writeable is true then the file will be opened for reading and writing, by default write is off. Note the same file should not be simultaneously written two by two separate processes. More...
 
 ~MatMap ()
 
void open (std::string filename, bool writeable=false)
 Open an existing file as a memory map. The file must already exist. If writeable is true then the file will be opened for reading and writing, by default write is off. Note the same file should not be simultaneously written two by two separate processes. More...
 
void create (std::string filename, size_t newrows, size_t newcols)
 Open an new file as a memory map. ANY OLD FILE WILL BE DELETED The file is always opened for writing and reading. Note the same file should not be simultaneously written two by two separate processes. More...
 
void close ()
 
bool isopen ()
 
const size_t & rows () const
 
const size_t & cols () const
 

Public Attributes

Eigen::Map< MatrixXd > mat
 

Detailed Description

Definition at line 181 of file fmri_inference.h.

Constructor & Destructor Documentation

npl::MatMap::MatMap ( )
inline

default constructor no file is opened

Definition at line 187 of file fmri_inference.h.

npl::MatMap::MatMap ( std::string  filename,
size_t  rows,
size_t  cols 
)
inline

Open an new file as a memory map. ANY OLD FILE WILL BE DELETED The file is always opened for writing and reading. Note the same file should not be simultaneously written two by two separate processes.

Parameters
filenameFile to open
rowsNumber of rows in matrix file
colsnumber of columns in matrix file

Definition at line 200 of file fmri_inference.h.

npl::MatMap::MatMap ( std::string  filename,
bool  writeable = false 
)
inline

Open an existing file as a memory map. The file must already exist. If writeable is true then the file will be opened for reading and writing, by default write is off. Note the same file should not be simultaneously written two by two separate processes.

Parameters
filenameFile to open
writeablewhether writing is allowed

Definition at line 214 of file fmri_inference.h.

npl::MatMap::~MatMap ( )
inline

Definition at line 219 of file fmri_inference.h.

Member Function Documentation

void npl::MatMap::close ( )
inline

Definition at line 243 of file fmri_inference.h.

const size_t& npl::MatMap::cols ( ) const
inline

Definition at line 254 of file fmri_inference.h.

void npl::MatMap::create ( std::string  filename,
size_t  newrows,
size_t  newcols 
)

Open an new file as a memory map. ANY OLD FILE WILL BE DELETED The file is always opened for writing and reading. Note the same file should not be simultaneously written two by two separate processes.

Parameters
filenameFile to open
newrowsNumber of rows in matrix file
newcolsnumber of columns in matrix file
bool npl::MatMap::isopen ( )
inline

Definition at line 248 of file fmri_inference.h.

void npl::MatMap::open ( std::string  filename,
bool  writeable = false 
)

Open an existing file as a memory map. The file must already exist. If writeable is true then the file will be opened for reading and writing, by default write is off. Note the same file should not be simultaneously written two by two separate processes.

Parameters
filenameFile to open
writeablewhether writing is allowed
const size_t& npl::MatMap::rows ( ) const
inline

Definition at line 253 of file fmri_inference.h.

Member Data Documentation

Eigen::Map<MatrixXd> npl::MatMap::mat

Definition at line 254 of file fmri_inference.h.


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