Public Member Functions | Private Attributes | List of all members
IO_matrix_file Class Reference

Read and write data at every iterations in a file. More...

#include <gnugraph.h>

Inheritance diagram for IO_matrix_file:
Inheritance graph
[legend]

Public Member Functions

 IO_matrix_file (const std::string &filename)
 Constructor. More...
 
short read (std::vector< Matrix > &data)
 
short read (std::vector< Matrix > &data, std::vector< std::string > &title)
 
short read_all (std::vector< Matrix > &data, std::vector< std::string > &data_title)
 Reads all sequences of data. More...
 
short write (const std::vector< Matrix > &data)
 
short write (const std::vector< Matrix > &data, const std::vector< std::string > &title)
 

Private Attributes

std::string filename
 File name. More...
 
int nb_element
 Number of elements to read or write. More...
 
int nb_iterations_read
 Number of iterations in reading mode. More...
 
int nb_iterations_write
 Number of iterations in writing mode. More...
 
int position_read
 Position to read the file. More...
 

Detailed Description

Read and write data at every iterations in a file.

Definition at line 201 of file gnugraph.h.

Constructor & Destructor Documentation

IO_matrix_file::IO_matrix_file ( const std::string &  filename)

Constructor.

Definition at line 478 of file gnugraph.cpp.

Member Function Documentation

short IO_matrix_file::read ( std::vector< Matrix > &  data)
short IO_matrix_file::read ( std::vector< Matrix > &  data,
std::vector< std::string > &  title 
)
short IO_matrix_file::read_all ( std::vector< Matrix > &  data,
std::vector< std::string > &  data_title 
)

Reads all sequences of data.

If the file "filename does not exist yet, created it and fill the first line with the number of rows and columns for each element of "data". ex: 6x1;3x1;3x3; This line indidate that data has 3 elements Matrix. The first one has 6 rows and 1 columns, the second one has 3 rows and 1 columns ...

Definition at line 676 of file gnugraph.cpp.

short IO_matrix_file::write ( const std::vector< Matrix > &  data)
short IO_matrix_file::write ( const std::vector< Matrix > &  data,
const std::vector< std::string > &  title 
)

Member Data Documentation

std::string IO_matrix_file::filename
private

File name.

Definition at line 215 of file gnugraph.h.

int IO_matrix_file::nb_element
private

Number of elements to read or write.

Definition at line 211 of file gnugraph.h.

int IO_matrix_file::nb_iterations_read
private

Number of iterations in reading mode.

Definition at line 211 of file gnugraph.h.

int IO_matrix_file::nb_iterations_write
private

Number of iterations in writing mode.

Definition at line 211 of file gnugraph.h.

int IO_matrix_file::position_read
private

Position to read the file.

Definition at line 211 of file gnugraph.h.


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


kni
Author(s): Martin Günther
autogenerated on Fri Jun 7 2019 22:06:46