Convert strings to integers and store them in the Values array.
#
Name
Type
Description
1
aList
tStrings *
2
Delimiter = kTab
const DewString &
Remarks:
Convert strings in aList to an integer number and stores them in the Values array of the calling matrix. MatrixInt::Rows property is set to aList.Count. TMtxVecInt::IntPrecision and MatrixInt::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 Delimiter. By default the delimiter is the tab charachter.
Convert strings from [ListIndex]..[ListIndex+ListLen-1] in aList to integers.
#
Name
Type
Description
1
aList
tStrings *
2
ListIndex
constint
3
ListLen
constint
4
Row
constint
5
Col
constint
6
Delimiter = kTab
DewString
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.
Examples
#include "MtxStrings.h"
#include "MtxExprInt.h"
using namespace Dew;
using namespace Dew::Math;
void Example()
{
MatrixInt a, b;
tStringList* Lines;
Lines = new tStringList();
a = {{1, 2}, {3, 4}};
b.Size(a);
b.SetVal(1);
a.Add(b);
Lines->Clear();
a.ValuesToStrings(Lines);
b.ValuesToStrings(Lines);
Lines->SaveToFile("Test.txt");
Lines->LoadFromFile("Test.txt");
a.StringsToValues(Lines);
delete Lines;
}
Declared in Dew::Math::MatrixInt · Dew.Math/MtxExprInt.h · Cross-compiler