I'm trying to compile some code that I downloaded. The code uses
Blitz++ and tvmet to manipulate arrays. I have never worked with either
of these, and I am having trouble getting both of these to work. When I
compile the code, I get a compiler error in the tvmet files. Instead of
trying to figure out what is going on with tvmet, I decided to do
everything with blitz. Which is also not working out. I am hoping that
someone can provide some insight into what I am doing wrong.
For example, I removed the following code.
typedef tvmet::Matrix<double,3, 3mtr_type;
typedef blitz::Array<mtr_type,2matrix;
..
..
..
mutable matrix mat;
If I correctly understand the above code then "mat" is a 3 by 3 array.
I replaced this code with
blitz::Array<double,2mat(3,3);
Which gave me the error message 'The text "3" is unexpected'.
Any insight into the problem would be appreciated. 2 1948
dss wrote:
I'm trying to compile some code that I downloaded. The code uses
Blitz++ and tvmet to manipulate arrays. I have never worked with either
of these, and I am having trouble getting both of these to work. When I
compile the code, I get a compiler error in the tvmet files. Instead of
trying to figure out what is going on with tvmet, I decided to do
everything with blitz. Which is also not working out. I am hoping that
someone can provide some insight into what I am doing wrong.
For example, I removed the following code.
typedef tvmet::Matrix<double,3, 3mtr_type;
typedef blitz::Array<mtr_type,2matrix;
.
.
.
mutable matrix mat;
If I correctly understand the above code then "mat" is a 3 by 3 array.
I replaced this code with
blitz::Array<double,2mat(3,3);
Which gave me the error message 'The text "3" is unexpected'.
Any insight into the problem would be appreciated.
I would guess that mat exists in a class, right? I'm guessing this
because of the use of the keyword mutable.
If so then you do not construct class members where you declare them,
you do so in a constructor initalisation list instead.
This is illegal
class X
{
X() {}
blitz::Array<double,2mat(3,3);
};
This is legal
class X
{
X() : mat(3,3) {}
blitz::Array<double,2mat;
};
HTH
john
John Harrison wrote:
dss wrote:
>I'm trying to compile some code that I downloaded. The code uses Blitz++ and tvmet to manipulate arrays. I have never worked with either of these, and I am having trouble getting both of these to work. When I compile the code, I get a compiler error in the tvmet files. Instead of trying to figure out what is going on with tvmet, I decided to do everything with blitz. Which is also not working out. I am hoping that someone can provide some insight into what I am doing wrong. For example, I removed the following code.
typedef tvmet::Matrix<double,3, 3mtr_type; typedef blitz::Array<mtr_type,2matrix; . . . mutable matrix mat;
If I correctly understand the above code then "mat" is a 3 by 3 array. I replaced this code with
blitz::Array<double,2mat(3,3);
Which gave me the error message 'The text "3" is unexpected'.
Any insight into the problem would be appreciated.
I would guess that mat exists in a class, right? I'm guessing this
because of the use of the keyword mutable.
If so then you do not construct class members where you declare them,
you do so in a constructor initalisation list instead.
This is illegal
class X
{
X() {}
blitz::Array<double,2mat(3,3);
};
This is legal
class X
{
X() : mat(3,3) {}
blitz::Array<double,2mat;
};
HTH
john
Yes. You are correct. I guess my understanding of
"tvmet::Matrix<double,3, 3>" must be incorrect. Thanks John This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: blitz-dev-bounces |
last post by:
Your mail to 'Blitz-dev' with the subject
Re: Your archive
Is being held until the list moderator can review it for approval.
The reason it is being held:
Post by non-member to a...
|
by: Steven T. Hatton |
last post by:
I bought Josuttis's book on the repeated recommendations of people in this
newsgroup.
http://www.josuttis.com/libbook/
One of the first things I looked up was the std::valarray<>. And what I...
|
by: Florian |
last post by:
Hi,
My first experiences with Blitz++
http://sourceforge.net/projects/blitz/
show both flexibility and high performance.
But I also need a good Iterative solver library like
Gmm++ for...
|
by: Guch |
last post by:
I'll swictch from Matlab to C++. So I want to find a matrix library of
C++, Whitch can process images conveniently as Matlab does.
I've googled, and found that Blitz++ and MTL are popular and...
|
by: Guch Wu |
last post by:
Array<unsigned char,2> A(10,10);
unsigned char* rawdata;
rawdata = new (unsinged char);
Can I extract data in A to rawdata without using for loop?
| |
by: monkeyboy |
last post by:
Hello,
I'm a new scipy user, and I'm trying to speed up some array code with
weave. I'm running xp with gcc from cgywin, and scipy.weave.test()
returns an OK status.
I'm trying to speed up...
|
by: alexjcollins |
last post by:
The following program demonstrates the problem:
#include <vector>
#include <iostream>
#include <tvmet/Vector.h>
typedef tvmet::Vector<double, 3Vector3d;
class Mesh
{
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |