25 Mille::Mille(
const char *outFileName,
bool asBinary,
bool writeZero) :
26 myOutFile(outFileName, (asBinary ? (std::ios::binary | std::ios::out) : std::ios::out)),
27 myAsBinary(asBinary), myWriteZero(writeZero), myBufferPos(-1), myHasSpecial(false)
35 std::cerr <<
"Mille::Mille: Could not open " << outFileName
36 <<
" as output file." << std::endl;
59 int NGL,
const float *derGl,
const int *label,
60 float rMeas,
float sigma)
62 if (sigma <= 0.)
return;
72 for (
int i = 0; i < NLC; ++i) {
86 for (
int i = 0; i < NGL; ++i) {
93 std::cerr <<
"Mille::mille: Invalid label " << label[i]
109 if (nSpecial == 0)
return;
112 std::cerr <<
"Mille::special: Special values already stored for this record."
133 for (
int i = 0; i < nSpecial; ++i) {
155 myOutFile.write(reinterpret_cast<const char*>(&numWordsToWrite),
156 sizeof(numWordsToWrite));
168 for (
int i = 0; i < myBufferPos+1; ++i) {
198 std::cerr <<
"Mille::checkBufferSize: Buffer too short ("
200 <<
"\n need space for nLocal (" << nLocal<<
")"
201 <<
"/nGlobal (" << nGlobal <<
") local/global derivatives, "