[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Allocating N-dimensional Array in C++
From: |
Søren Hauberg |
Subject: |
Re: Allocating N-dimensional Array in C++ |
Date: |
Sat, 06 Mar 2010 11:30:26 -0800 |
lør, 06 03 2010 kl. 20:11 +0100, skrev Carlo de Falco:
> > dim_vector size; idxa.resize (4);
> > size (0) = 1;
> > size (1) = 7;
> > size (2) = 3;
> > size (3) = 2;
> >
> > NDArray A (size);
>
> ooops, of course that was
> dim_vector size; size.resize (4);
Ahh, that works for me. Thanks a bunch!
Could be potentially add an API for creating 'dim_vector's for high
dimensional arrays, like
const octave_idx_type tmp_size [] = {1, 7, 3, 2};
const dim_vector size (tmp_size, sizeof (tmp_size));
?
Søren
- Allocating N-dimensional Array in C++, Søren Hauberg, 2010/03/06
- Re: Allocating N-dimensional Array in C++, Carlo de Falco, 2010/03/06
- Re: Allocating N-dimensional Array in C++, Jaroslav Hajek, 2010/03/06
- Re: Allocating N-dimensional Array in C++, Søren Hauberg, 2010/03/07
- Re: Allocating N-dimensional Array in C++, Jaroslav Hajek, 2010/03/07
- Re: Allocating N-dimensional Array in C++, Søren Hauberg, 2010/03/07
- Re: Allocating N-dimensional Array in C++, Jaroslav Hajek, 2010/03/08
- Re: Allocating N-dimensional Array in C++, Søren Hauberg, 2010/03/08
- Re: Allocating N-dimensional Array in C++, John W. Eaton, 2010/03/15
- Re: Allocating N-dimensional Array in C++, Jaroslav Hajek, 2010/03/17
- Re: Allocating N-dimensional Array in C++, John W. Eaton, 2010/03/18
- Re: Allocating N-dimensional Array in C++, Søren Hauberg, 2010/03/19