43 bool keepZeros,
unsigned int aSize) :
44 binaryFile(fileName.c_str(), std::ios::binary | std::ios::out), intBuffer(), floatBuffer(), doubleBuffer(), doublePrecision(
45 doublePrec), globalDerKeepZeros(keepZeros) {
74 unsigned int* indLocal,
double* derLocal,
75 const std::vector<int> &labGlobal,
76 const std::vector<double> &derGlobal) {
82 for (
unsigned int i = 0; i < numLocal; ++i) {
88 for (
unsigned int i = 0; i < labGlobal.size(); ++i) {
98 for (
unsigned int i = 0; i < numLocal; ++i) {
104 for (
unsigned int i = 0; i < labGlobal.size(); ++i) {
116 const int recordLength =
118 binaryFile.write(
reinterpret_cast<const char*
>(&recordLength),
119 sizeof(recordLength));
MilleBinary(const std::string &fileName="milleBinaryISN.dat", bool doublePrec=false, bool keepZeros=false, unsigned int aSize=2000)
Create binary file.
std::vector< float > floatBuffer
Float buffer.
std::vector< double > doubleBuffer
Double buffer.
void writeRecord()
Write record to file.
bool doublePrecision
Flag for storage in as double values.
bool globalDerKeepZeros
Flag for keeping global derivatives with value zero.
std::vector< int > intBuffer
Integer buffer.
void addData(double aMeas, double aErr, unsigned int numLocal, unsigned int *indLocal, double *derLocal, const std::vector< int > &labGlobal, const std::vector< double > &derGlobal)
Add data block to (end of) record.
std::ofstream binaryFile
Binary File.
Namespace for the general broken lines package.