TableData.h
上传用户:szb0815
上传日期:2007-06-13
资源大小:338k
文件大小:3k
- //---------------------------------------------------------------------------
- #ifndef TableDataH
- #define TableDataH
- #include <vector>
- //---------------------------------------------------------------------------
- #define NODATA 99999.00
- class TTableObjectInfo : public TObject
- {
- public:
- __fastcall TTableObjectInfo();
- __fastcall ~TTableObjectInfo();
- void __fastcall ReadFromStream(TFileStream *Stream);
- void __fastcall WriteToStream(TFileStream *Stream);
- AnsiString ID;
- AnsiString Name;
- int Group;
- float Weight;
- float Order;
- };
- class TTableData : public TObject
- {
- public:
- __fastcall TTableData();
- __fastcall ~TTableData();
- void __fastcall LoadFromTabFile(AnsiString FileName);
- void __fastcall SaveToTabFile(AnsiString FileName);
- void __fastcall ReadFromBinaryFile(AnsiString FileName);
- void __fastcall SaveToBinaryFile(AnsiString FileName);
- void __fastcall CopyFrom(TTableData *CopyData);
- void __fastcall CopyFromRowList(TTableData *CopyData, std::vector<int> List);
- void __fastcall CopyTransposedFrom(TTableData *CopyData);
- void __fastcall MeanCenterRows();
- void __fastcall NormalizeRows();
- void __fastcall PermuteInRows();
- void __fastcall OrthogonalizeRow(int Row, float *Vector);
- void __fastcall OrthogonalizeRows(float *Vector);
- void __fastcall OrthogonalizeRowList(float *Vector, int *List, int n);
- float * __fastcall RowData(int Row);
- float *ColumnData(int Column);
- float *RowDataByID(AnsiString ID);
- float *ColumnDataByID(AnsiString ID);
- void __fastcall RowAve(float *AveData);
- void __fastcall RowListAve(int *List, int n, float *AveData);
- float __fastcall Variance();
- std::vector<int> __fastcall GroupList(int Group);
- AnsiString __fastcall RawHeader();
- AnsiString __fastcall RawRowString(int Row);
- float **Data;
-
- int Rows;
- int Columns;
-
- AnsiString IDType;
- TTableObjectInfo **ColumnInfo;
- TTableObjectInfo **RowInfo;
- };
- AnsiString __fastcall RowDataInfoToString(float *OutRowData, int n, TTableObjectInfo *Info);
- AnsiString __fastcall RowDataLabelToString(float *OutRowData, int n, AnsiString Label);
- AnsiString __fastcall RowDataLabelsToString(float *OutRowData, int n, AnsiString IDLabel, AnsiString NameLabel);
- #endif