Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TVecInt *Ramp() const; | Fills the calling vector with a series following linear rule. |
| 2 | TVecInt *Ramp(const double Offset, const double Step) const; | Fills the calling vector. |
| 3 | TVecInt *Ramp(const double Offset, const double Step, const int Index, const int Len) const; | Fills the calling vector elements [Index]..[Index+Len-1]. |
Overload 1: TVecInt *Ramp() const;
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 "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: VectorInt::SetVal
Declared in Dew::Math::VectorInt · Dew.Math/MtxExprInt.h · Cross-compiler
Overload 2: TVecInt *Ramp(const double Offset, const double Step) const;
Fills the calling vector.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Offset | const double | |
| 2 | Step | const double |
Remarks:
Method uses the following rule:
Values[k] := Offset + k*Step.
Declared in Dew::Math::VectorInt · Dew.Math/MtxExprInt.h · Cross-compiler
Overload 3: TVecInt *Ramp(const double Offset, const double Step, const int Index, const int Len) const;
Fills the calling vector elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Offset | const double | |
| 2 | Step | const double | |
| 3 | Index | const int | |
| 4 | Len | const int |
Remarks:
Method uses the following rule:
Values[k] := Offset + k*Step.
An exception is raised if calling vector array borders are overrun.
Examples
#include "MtxExprInt.h"
using namespace Dew;
using namespace Dew::Math;
void Example()
{
VectorInt a;
a.Size(5, TIntPrecision::prInt32);
a.Ramp(0, 2); // [0, 2, 4, 6, 8]
}
Declared in Dew::Math::VectorInt · Dew.Math/MtxExprInt.h · Cross-compiler