Data = Allocate(); // this data array will contain the keys for the associated tables
Tables.reserve(nTables);
for (int i=0; i<nTables; i++) Tables.push_back(FGTable(NRows, NCols));
+ lastRowIndex=lastColumnIndex=2;
Debug(0);
}
}
Value = Factor*(Tables[r-1].GetValue(rowKey, colKey) - Tables[r-2].GetValue(rowKey, colKey))
- + Tables[r-1].GetValue(rowKey, colKey);
+ + Tables[r-2].GetValue(rowKey, colKey);
return Value;
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-void FGTable::Print(void)
+void FGTable::Print(int spaces)
{
+ string tabspace;
int startRow=0;
int startCol=0;
ios::fmtflags flags = cout.setf(ios::fixed); // set up output stream
#endif
+ for (int i=0;i<spaces;i++) tabspace+=" ";
+
cout.precision(4);
for (int r=startRow; r<=nRows; r++) {
- cout << " ";
+ cout << tabspace;
for (int c=startCol; c<=nCols; c++) {
if (r == 0 && c == 0) {
cout << " ";
cout << Data[r][c] << " ";
if (Type == tt3D) {
cout << endl;
- Tables[r-1].Print();
+ Tables[r-1].Print(spaces);
}
}
}