Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtxVecInt *Ramp(double Offset, double Step, int Index, int Len); | Fills the calling vector elements [Index]..[Index+Len-1]. |
| 2 | TVecInt *Ramp(); | Fills the calling vector with a series following linear rule. |
| 3 | TVecInt *Ramp(double Offset, double Step); | Fills the calling vector. |
Overload 1: TMtxVecInt *Ramp(double Offset, double Step, int Index, int Len);
Fills the calling vector elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Offset | double | |
| 2 | Step | double | |
| 3 | Index | int | |
| 4 | Len | int |
Remarks:
Method uses the following rule:
Values[k] := Offset + k*Step.
An exception is raised if calling vector array borders are overrun.
Declared in Dew::Math::TMtxVecInt · Dew.Math/AbstractMtxVecInt.h · Cross-compiler
Overload 2: TVecInt *Ramp();
Fills the calling vector with a series following linear rule.
Remarks:
Fills the calling vector with a series following the rule:
Values[k] := k
(Offset is zero and Step is one).
Examples
#include "Math387.h"
#include "MtxVecInt.h"
#include "Units.MtxVecInt.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxVecInt;
void Example()
{
TVecInt* a;
CreateIt(a);
a->Size(5, TIntPrecision::prInt32);
a->Ramp(0, 2); // [0, 2, 4, 6, 8]
FreeIt(a);
}
#include "MtxVecInt.h"
#include "Units.MtxVecInt.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxVecInt;
void Example()
{
TVecInt* a;
int i;
CreateIt(a);
a->Size(5, TIntPrecision::prInt32);
for (i = 0; i < a->Length; i++) (*a)[i] = i*2;
FreeIt(a);
}
See Also: TVecByte::SetVal
Declared in Dew::Math::TVecInt · Dew.Math/MtxVecInt.h · Cross-compiler
Overload 3: TVecInt *Ramp(double Offset, double Step);
Fills the calling vector.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Offset | double | |
| 2 | Step | double |
Remarks:
Method uses the following rule:
Values[k] := Offset + k*Step.
Declared in Dew::Math::TVecInt · Dew.Math/MtxVecInt.h · Cross-compiler