TMtx::StringsToValues Method

Overload List

#SignatureDescription
1TMtx *StringsToValues(tStrings *srcList, const DewString &aDelimiter);Convert strings to double (TCplx) and store them in the Values array.
2virtual TMtx *StringsToValues(tStrings *srcList);Convert strings to double (TCplx) and store them in the Values array.
3TMtx *StringsToValues(tStrings *srcList, int ListIndex, int ListLen, int Row, int Col, DewString Delimiter = kTab);Convert strings from [ListIndex]..[ListIndex+ListLen-1] in aList to double (TCplx).
4TMtx *StringsToValues(const DewArray<DewString> &aList, const DewString &Delimiter = kTab);
5TMtx *StringsToValues(const DewArray<DewString> &aList, int ListIndex, int ListLen, int Row, int Col, DewString Delimiter = kTab);

Overload 1: TMtx *StringsToValues(tStrings *srcList, const DewString &aDelimiter);

Convert strings to double (TCplx) and store them in the Values array.

#NameTypeDescription
1srcListtStrings *
2aDelimiterconst DewString &
Remarks:

Convert strings in aList to double (real number) and store them in the Values array of the calling matrix. TMtx::Rows property is set to aList.Count. TMtx::Complex and TMtx::Cols propertes are auto-detected. Complex numbers must follow the format: a+bi. All strings must have the same number of columns (numbers). Columns must be separated with a aDelimiter.

Examples
#include "MtxStrings.h"
#include "MtxVec.h"
#include "Units.MtxVec.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxVec;

void Example()
{
    TMtx *a, *b;
    tStringList* Lines;

    CreateIt(a, b);
    a->SetIt(2, 2, false, DewArray<double>{1, 2, 3, 4});
    a->Cos();
    b->Size(a);
    b->SetVal(1);
    a->Add(b);
    Lines = new tStringList();
    a->ValuesToStrings(Lines);
    b->ValuesToStrings(Lines);
    Lines->SaveToFile("Test.txt");
    Lines->LoadFromFile("Test.txt");
    a->StringsToValues(Lines);
    delete Lines;
    FreeIt(a, b);
}
See Also: TMtx::ValuesToStrings
Declared in Dew::Math::TMtx · Dew.Math/MtxVec.h · Cross-compiler

Overload 2: virtual TMtx *StringsToValues(tStrings *srcList);

Convert strings to double (TCplx) and store them in the Values array.

#NameTypeDescription
1srcListtStrings *
Remarks:

Uses Tab (#9) as the default column separator.

Declared in Dew::Math::TMtx · Dew.Math/MtxVec.h · Cross-compiler

Overload 3: TMtx *StringsToValues(tStrings *srcList, int ListIndex, int ListLen, int Row, int Col, DewString Delimiter = kTab);

Convert strings from [ListIndex]..[ListIndex+ListLen-1] in aList to double (TCplx).

#NameTypeDescription
1srcListtStrings *
2ListIndexint
3ListLenint
4Rowint
5Colint
6Delimiter = kTabDewString
Remarks:

Store them in the Values array of the calling matrix, starting from element [Row,Cols]. The size of the calling matrix is not changed. If array bounds are overrun an exception is raised. Complex numbers must follow the format: a+bi.

Declared in Dew::Math::TMtx · Dew.Math/MtxVec.h · Cross-compiler

Overload 4: TMtx *StringsToValues(const DewArray<DewString> &aList, const DewString &Delimiter = kTab);

#NameTypeDescription
1aListconst DewArray<DewString> &
2Delimiter = kTabconst DewString &
Declared in Dew::Math::TMtx · Dew.Math/MtxVec.h · Cross-compiler

Overload 5: TMtx *StringsToValues(const DewArray<DewString> &aList, int ListIndex, int ListLen, int Row, int Col, DewString Delimiter = kTab);

#NameTypeDescription
1aListconst DewArray<DewString> &
2ListIndexint
3ListLenint
4Rowint
5Colint
6Delimiter = kTabDewString
Declared in Dew::Math::TMtx · Dew.Math/MtxVec.h · Cross-compiler