help-octave
[Top][All Lists]
Advanced

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

Sparse matrices operators in C++ using liboctave


From: Basilio
Subject: Sparse matrices operators in C++ using liboctave
Date: Thu, 12 Nov 2009 07:02:06 -0800 (PST)

Hi all,
I'm trying to use a Sparse-to-scalar comparison operator (==) between
Sparse<uint8_t> and uint8_t, and I would like to use one of the operators in
the macros from Sparse-op-defs.h,
like SPARSE_SMS_CMP_OP_DECLS(M, S, API) or SPARSE_SMS_CMP_OP(M, S, API).
I tried to do
SPARSE_SMS_CMP_OP_DECLS (Sparse<uint8_t>, uint8_t, OCTAVE_API)
in my code, and used mx_el_eq to make the desired comparison and get the
resulting sparse bool matrix.
When I try to compile, it gives me a linker error, like

ca2d.cc:(.text+0x1364): undefined reference to `mx_el_eq(Sparse<unsigned
char> const&, unsigned char const&)'
ca2d.cc:(.text+0x15d4): undefined reference to `mx_el_eq(Sparse<unsigned
char> const&, unsigned char const&)'
collect2: ld returned 1 exit status

I used boolean operators mx_el_and, mx_el_or without any problem.
Can anyone help me in using == and other comparison operators with
Sparse<uint8_t>?
Thanks!

bas
-- 
View this message in context: 
http://old.nabble.com/Sparse-matrices-operators-in-C%2B%2B-using-liboctave-tp26320210p26320210.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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