Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtx *SetCol(TDenseMtxVec *Vec, int Col) const; | Copies values from vector to matrix column. |
| 2 | TMtx *SetCol(TDenseMtxVec *Vec, int VecIndex, int Row, int Col, int Len) const; | Copy vector Vec elements [VecIndex]..[VecIndex+Len-1] to the calling matrix elements [Row,Col]..[Row+Len-1,Col]. |
Overload 1: TMtx *SetCol(TDenseMtxVec *Vec, int Col) const;
Copies values from vector to matrix column.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TDenseMtxVec * | |
| 2 | Col | int |
Remarks:
Copy all Vec elements to the calling matrix Col column. The Matrix::Complex property of the calling matrix is adjusted automatically. An exception is raised, if array bounds are overrun.
Examples
#include "MtxExpr.h"
using namespace Dew;
using namespace Dew::Math;
void Example()
{
Matrix A;
Vector V;
A.Size(2, 1, true);
V.SetIt(true, DewArray<double>{1, 2, 2, 4}); // complex vector
A.SetCol(V, 0);
}
See Also: Matrix::SetRow
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler
Overload 2: TMtx *SetCol(TDenseMtxVec *Vec, int VecIndex, int Row, int Col, int Len) const;
Copy vector Vec elements [VecIndex]..[VecIndex+Len-1] to the calling matrix elements [Row,Col]..[Row+Len-1,Col].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TDenseMtxVec * | |
| 2 | VecIndex | int | |
| 3 | Row | int | |
| 4 | Col | int | |
| 5 | Len | int |
Remarks:
An exception is raised if condition checking is enabled and array bounds are overrun. An exception is raised, if Vec and the calling matrix complex properties do not match.
Examples
#include "MtxExpr.h"
#include "Units.Math387.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::Math387;
void Example()
{
Matrix A;
Vector V;
A.Size(2, 1, true);
V = {Cplx(1, 2), Cplx(2, 4)}; // complex vector
A.SetCol(V, 0);
}
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler