File kernel/src/utils/SiconosAlgebra/ioVector.hpp#
Go to the source code of this file
input/output for SiconosVector
-
namespace ioVector#
Typedefs
-
typedef std::ios_base::openmode openmode#
Functions
-
bool read(const std::string &fileName, SiconosVector &m, const openmode &mode = ASCII_IN, int precision = 15, const std::string &inputType = "python", const std::ios::fmtflags &flags = std::cin.flags())#
Read a SiconosVector from a file.
- Parameters:
fileName – [in] the file containing the vector
m – [inout] the SiconosVector to be filled
mode – [in] ios_base::openmode, mode for reading (like ios::in|ios:binary …) default = ascii
precision – [in] value for float output. Default = 15.
inputType – [in] (see outputType in write function)
flags – [in] for reading
- Returns:
bool true if read ok, else false …
-
bool write(const std::string &fileName, const SiconosVector &m, const openmode &mode = ASCII_OUT, int precision = 15, const std::string &outputType = "python", const std::ios_base::fmtflags &flags = std::cout.flags())#
Write a SiconosVector to a file.
- Parameters:
fileName – [in] output file name
mode – [in] ios_base::openmode, mode for writing (like ios::out|ios:binary …) default = ascii
flags – [in]
m – [inout] the SiconosVector to be written
precision – [in] value for float output. Default = 15.
outputType – [in] output format, choose between
”boost”: row
”python” (default): row a0 a1 a2 …
”noDim”: a0 a1 a2 … Reading input format is the one corresponding to “python”.
flags – [in]
- Returns:
bool true if read ok, else false …
Variables
-
typedef std::ios_base::openmode openmode#