[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating double hypermatrix in C++

From: Carlo de Falco
Subject: Re: Creating double hypermatrix in C++
Date: Wed, 19 Oct 2016 07:32:49 +0200

Il 19 ott 2016 7:19 AM, "Shamika Mohanan" <address@hidden> ha scritto:
> Hello,
> It works if the dimensions are specified. I had to change a to 0 based indexing. What does 4 refer to in dim_vector d(4, iRows, iCols);? Number of matrices?
> Shamika

It's the range of variation of the first index, you had

for (a = 1; a ≤ 3; a++)

Which means "a" can take the maximum value of 3, as the minimum value is always 0, that means "a" can take 4 different values.

In Octave sources the indices of a 3dimensional matrix are some times referred to as

1st index = row index
2nd index = column index
3rd index = page index

In this notation your matrix had 4 rows, "iRows" columns and "iCols" pages and "a" is the "row index".


reply via email to

[Prev in Thread] Current Thread [Next in Thread]