[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: liboctave class specifications
From: |
David Bateman |
Subject: |
Re: liboctave class specifications |
Date: |
Mon, 07 Apr 2008 14:07:48 +0200 |
User-agent: |
Thunderbird 2.0.0.12 (X11/20080306) |
Ken Massey wrote:
> I would like to use the liboctave library in my C++ programs, but I
> cannot find an English version of:
>
>
> http://vision.kuee.kyoto-u.ac.jp/~hiroaki/numerical/octave-headers-html/classes.html
>
Try
http://octave.sourceforge.net/doxygen/html/index.html
> Specifically, I would like to do something like this:
>
> #include <octave/oct.h>
>
> double mydata x[10000];
> // C++ code to generate data
> Matrix A = Matrix (100, 100);
> // copy data from x into A
> // can I use memcpy, or even better, just set the data() pointer for
> A to point to x ???
>
double mydata[10000];
Matrix A = Matrix (100, 100);
double *Ap = A.fortran_vec ();
for (octave_idx_type i = 0; i < 10000; i++)
Ap[i] = mydata[i];
> What is the internal storage mechanism for Octave matrices, i.e. row
> or column major?
All matrices in Octave are stored in column-major order.
> How about sparse matrices?
Sparse matrices are in Compressed Column Order. With the needed methods
for the data being, "data", "ridx" and "cidx".
> I would like to be able
> to construct data with C++ and call octave functions to manipulate it,
> similar to the way I may call BLAS or LAPACK functions with pointers
> to the data.
>
Do you need the interpreter or only liboctave? If you need the
interpreter check the message
http://www.cae.wisc.edu/pipermail/help-octave/2008-April/008713.html
> Any help or info about online documentation/examples would be great.
>
Also check the manual.. An relatively recent (though not the most recent
version) is available at
http://www.octave.org/doc/interpreter/
and in particular check
http://www.octave.org/doc/interpreter/Dynamically-Linked-Functions.html
D.
> Thanks,
> Kenneth
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave
>
>
--
David Bateman address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary