Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtxVec *LogN(double N) const; | Log base N. |
| 2 | TMtxVec *LogN(double N, int Index, int Len) const; | Calculate the log base N of calling object elements [Index]..[Index+Len-1] in-place. |
| 3 | TMtxVec *LogN(double N, TMtxVec *X) const; | Calculate the log base N of all X object elements and store the results in calling object. |
| 4 | TMtxVec *LogN(double N, TMtxVec *X, int XIndex, int Index, int Len) const; | Calculate the log base N of X object elements [XIndex]..[XIndex+Len-1]. The results are stored in calling object elements [Index]..[Index+Len-1]. |
Overload 1: TMtxVec *LogN(double N) const;
Log base N.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | N | double |
Remarks:
Calculate the log base N for all calling object elements in-place.
Examples
#include "MtxExpr.h"
using namespace Dew;
using namespace Dew::Math;
void Example()
{
Matrix a;
a.SetIt(1, 4, false, DewArray<double>{1, 2, 3, 4}); // a = [1,2,3,4]
a.LogN(10.0); // log base 10, the slow way a = [Log10(1), Log10(2),...]
}
See Also: Matrix::Power
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler
Overload 2: TMtxVec *LogN(double N, int Index, int Len) const;
Calculate the log base N of calling object elements [Index]..[Index+Len-1] in-place.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | N | double | |
| 2 | Index | int | |
| 3 | Len | int |
Remarks:
An exception is raised if array borders are overrun.
Examples
#include "MtxExpr.h"
using namespace Dew;
using namespace Dew::Math;
void Example()
{
Matrix a;
a = {{1, 2, 3, 4}}; // a = [1,2,3,4]
a.LogN(10.0); // log base 10, the slow way a = [Log10(1), Log10(2),...]
}
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler
Overload 3: TMtxVec *LogN(double N, TMtxVec *X) const;
Calculate the log base N of all X object elements and store the results in calling object.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | N | double | |
| 2 | X | TMtxVec * |
Remarks:
Size and Matrix::Complex properties of the calling object are adjusted automatically.
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler
Overload 4: TMtxVec *LogN(double N, TMtxVec *X, int XIndex, int Index, int Len) const;
Calculate the log base N of X object elements [XIndex]..[XIndex+Len-1]. The results are stored in calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | N | double | |
| 2 | X | TMtxVec * | |
| 3 | XIndex | int | |
| 4 | Index | int | |
| 5 | Len | int |
Remarks:
Size and Matrix::Complex properties of the calling object are not changed. An exception is raised if array borders are overrun.
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler