Matrix::LoadFromFile Method

void LoadFromFile(const DewString &FileName) const;

Reads the header information and the values array content from the file.

#NameTypeDescription
1FileNameconst DewString &
Remarks:

Reads the header information and the values array content from the file specified by FileName parameter.

  • In case of '.csv' extension a comma is used as a column delimiter for matrices.
  • In case of '.txt' extension a tab is used as a column delimiter for matrices.
  • For all other extensions, the expected format is binary.
Examples
#include "MtxExpr.h"

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    Matrix b;

    b.LoadFromFile("PCA_Data.mtx"); // Read header and values for b
}
See Also: Matrix::SaveToFile, Matrix::LoadFromStream
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler