Method RavelIndex
RavelIndex(int, int, int, int, int, int, int, int)
Converts the indexes of the TensorShape
into a flat index.
shape: (5,1,2,3,4,5,6,7) => 2 * (1234567) + 0 * (234567) + 1 * (34567) + 0 * (4567) + 3 * (567) + 2 * (6*7) + 1 * (7) + 5 = 13326
index: (2,0,1,0,3,2,1,5)
Declaration
public int RavelIndex(int d7, int d6, int d5, int d4, int d3, int d2, int d1, int d0)
Parameters
Type | Name | Description |
---|---|---|
int | d7 | The index along axis 7. |
int | d6 | The index along axis 6. |
int | d5 | The index along axis 5. |
int | d4 | The index along axis 4. |
int | d3 | The index along axis 3. |
int | d2 | The index along axis 2. |
int | d1 | The index along axis 1. |
int | d0 | The index along axis 0. |
Returns
Type | Description |
---|---|
int | The raveled index. |
RavelIndex(int, int, int, int, int, int, int)
Converts the indexes of the TensorShape
into a flat index.
shape: (1,2,3,4,5,6,7) => 0 * (234567) + 1 * (34567) + 0 * (4567) + 3 * (567) + 2 * (6*7) + 1 * (7) + 5 = 3246
index: (0,1,0,3,2,1,5)
Declaration
public int RavelIndex(int d6, int d5, int d4, int d3, int d2, int d1, int d0)
Parameters
Type | Name | Description |
---|---|---|
int | d6 | The index along axis 6. |
int | d5 | The index along axis 5. |
int | d4 | The index along axis 4. |
int | d3 | The index along axis 3. |
int | d2 | The index along axis 2. |
int | d1 | The index along axis 1. |
int | d0 | The index along axis 0. |
Returns
Type | Description |
---|---|
int | The raveled index. |
RavelIndex(int, int, int, int, int, int)
Converts the indexes of the TensorShape
into a flat index.
shape: (2,3,4,5,6,7) => 1 * (34567) + 0 * (4567) + 3 * (567) + 2 * (67) + 1 * (7) + 5 = 3246
index: (1,0,3,2,1,5)
Declaration
public int RavelIndex(int d5, int d4, int d3, int d2, int d1, int d0)
Parameters
Type | Name | Description |
---|---|---|
int | d5 | The index along axis 5. |
int | d4 | The index along axis 4. |
int | d3 | The index along axis 3. |
int | d2 | The index along axis 2. |
int | d1 | The index along axis 1. |
int | d0 | The index along axis 0. |
Returns
Type | Description |
---|---|
int | The raveled index. |
RavelIndex(int, int, int, int, int)
Converts the indexes of the TensorShape
into a flat index.
shape: (3,4,5,6,7) => 0 * (4567) + 3 * (567) + 2 * (67) + 1 * (7) + 5 = 726
index: (0,3,2,1,5)
Declaration
public int RavelIndex(int d4, int d3, int d2, int d1, int d0)
Parameters
Type | Name | Description |
---|---|---|
int | d4 | The index along axis 4. |
int | d3 | The index along axis 3. |
int | d2 | The index along axis 2. |
int | d1 | The index along axis 1. |
int | d0 | The index along axis 0. |
Returns
Type | Description |
---|---|
int | The raveled index. |
RavelIndex(int, int, int, int)
Converts the indexes of the TensorShape
into a flat index.
shape: (4,5,6,7) => 3 * (567) + 2 * (6*7) + 1 * (7) + 5 = 726
index: (3,2,1,5)
Declaration
public int RavelIndex(int d3, int d2, int d1, int d0)
Parameters
Type | Name | Description |
---|---|---|
int | d3 | The index along axis 3. |
int | d2 | The index along axis 2. |
int | d1 | The index along axis 1. |
int | d0 | The index along axis 0. |
Returns
Type | Description |
---|---|
int | The raveled index. |
RavelIndex(int, int, int)
Converts the indexes of the TensorShape
into a flat index.
shape: (5,6,7) => 2 * (6*7) + 1 * (7) + 5 = 96
index: (2,1,5)
Declaration
public int RavelIndex(int d2, int d1, int d0)
Parameters
Type | Name | Description |
---|---|---|
int | d2 | The index along axis 2. |
int | d1 | The index along axis 1. |
int | d0 | The index along axis 0. |
Returns
Type | Description |
---|---|
int | The raveled index. |
RavelIndex(int, int)
Converts the indexes of the TensorShape
into a flat index.
shape: (6,7) => 1 * (7) + 5 = 12
index: (1,5)
Declaration
public int RavelIndex(int d1, int d0)
Parameters
Type | Name | Description |
---|---|---|
int | d1 | The index along axis 1. |
int | d0 | The index along axis 0. |
Returns
Type | Description |
---|---|
int | The raveled index. |