(no subject)

Jack Chessa <[email protected]> Wed, 18 Apr 2007 09:17:21 -0600
Newsgroups gmane.comp.lib.mtl.devel
Message-ID <[email protected]>
--===============1075270592==
Content-Type: multipart/alternative; boundary=Apple-Mail-5-1033746185


--Apple-Mail-5-1033746185
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=WINDOWS-1252;
	delsp=yes;
	format=flowed

Hello forgive me if this is an oversight on my part.  I am still =20
trying to figure out the algorithm notation with MTL.  It is a bit odd

I am using MTL ver 2.1.2-22 on OS X with gcc 4.0

I am ttrying to run vec_two_norm.cc


#include <iostream>
using namespace std;

#include <mtl/dense1D.h>
#include <mtl/mtl.h>

/*
   example output:

   6.32456

*/

int main()
{
   using namespace mtl;
   using namespace std;
   // begin
   dense1D<double> x(10, 2.0);
	print_vector(x);
   double s =3D two_norm(x);
   //cout << two_norm(x) << endl;
   // end

   return 0;
}

I get the following error

make mtl_norm
g++ -g  -I/Users/jackchessa/Code/Basso/basso-1.0/inc -I/Users/=20
jackchessa/Code/Basso/basso-1.0/mtl/mtl   -o mtl_norm mtl_norm.cpp -=20
framework veclib
In function =91typename mtl::linalg_traits<Linalg>::magnitude_type =20
mtl::two_norm(const Vector&) [with Vector =3D mtl::dense1D<double, 0>]=92:=

instantiated from here
error: dependent-name =91mtl::dim_n<Vector>::RET=92 is parsed as a non-=20=

type, but instantiation yields a type
note: say =91typename mtl::dim_n<Vector>::RET=92 if a type is meant
make[1]: *** [mtl_norm] Error 1
make: *** [tests] Error 2

Any idea what is going on here?

hanks
Jack

Jack Chessa
Assistant Professor
Department of Mechanical Engineering
University of Texas at El Paso
Email:	[email protected]
Office:	A309
Voice:	(915) 747-6900
Fax:		(915) 747-5019
Web:	www.dmc.utep.edu/chessa


--Apple-Mail-5-1033746185
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=WINDOWS-1252

<HTML><BODY style=3D"word-wrap: break-word; -khtml-nbsp-mode: space; =
-khtml-line-break: after-white-space; "><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Hello forgive =
me if this is an oversight on my part.=A0 I am still trying to figure =
out the algorithm notation with MTL.=A0 It is a bit odd</DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; font: normal normal normal 12px/normal Helvetica; =
min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I am using =
MTL ver 2.1.2-22 on OS X with gcc 4.0</DIV><DIV style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: =
normal normal normal 12px/normal Helvetica; min-height: 14px; =
"><BR></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; ">I am ttrying to run =
vec_two_norm.cc</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; font: normal normal normal =
12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; font: normal normal normal 12px/normal Helvetica; =
min-height: 14px; "><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>#include =
&lt;iostream&gt;</DIV><DIV>using namespace std;</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>#include =
&lt;mtl/dense1D.h&gt;</DIV><DIV>#include &lt;mtl/mtl.h&gt;</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>/*</DIV><DIV>=A0 example =
output:</DIV><DIV><BR class=3D"khtml-block-placeholder"></DIV><DIV>=A0 =
6.32456</DIV><DIV><BR class=3D"khtml-block-placeholder"></DIV><DIV> =
*/</DIV><DIV><BR class=3D"khtml-block-placeholder"></DIV><DIV>int =
main()</DIV><DIV>{</DIV><DIV>=A0 using namespace mtl;</DIV><DIV>=A0 =
using namespace std;</DIV><DIV>=A0 // begin</DIV><DIV>=A0 =
dense1D&lt;double&gt; x(10, 2.0);</DIV><DIV><SPAN class=3D"Apple-tab-span"=
 style=3D"white-space:pre">	</SPAN>print_vector(x);</DIV><DIV>=A0 =
double s =3D two_norm(x);</DIV><DIV>=A0 //cout &lt;&lt; two_norm(x) =
&lt;&lt; endl;</DIV><DIV>=A0 // end</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>=A0 return =
0;</DIV><DIV>}</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; font: normal normal normal =
12px/normal Helvetica; min-height: 14px; "><BR =
class=3D"khtml-block-placeholder"></DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I get the =
following error</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; font: normal normal normal =
12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; background-color: rgb(240, 240, 240); "><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 12.4px;">make =
mtl_norm</SPAN></FONT></DIV><DIV style=3D"margin-top: 0px; margin-right: =
0px; margin-bottom: 0px; margin-left: 0px; background-color: rgb(240, =
240, 240); "><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: =
12.4px;">g++ -g=A0 -I/Users/jackchessa/Code/Basso/basso-1.0/inc =
-I/Users/jackchessa/Code/Basso/basso-1.0/mtl/mtl =A0 -o mtl_norm =
mtl_norm.cpp -framework veclib</SPAN></FONT></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; background-color: rgb(240, 240, 240); "><A =
href=3D"txmt://open?url=3Dfile:///usr/local/include/mtl/mtl.h"><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 12.4px;">In function =
=91typename mtl::linalg_traits&lt;Linalg&gt;::magnitude_type =
mtl::two_norm(const Vector&amp;) [with Vector =3D =
mtl::dense1D&lt;double, 0&gt;]=92:</SPAN></FONT></A></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; background-color: rgb(240, 240, 240); "><A =
href=3D"txmt://open?url=3Dfile:///Users/jackchessa/Code/Basso/basso%2D1.0/=
examples/basic/mtl%5Fnorm.cpp&line=3D22"><FONT class=3D"Apple-style-span" =
face=3D"Monaco" size=3D"3"><SPAN class=3D"Apple-style-span" =
style=3D"font-size: 12.4px;">instantiated from =
here</SPAN></FONT></A></DIV><DIV style=3D"margin-top: 0px; margin-right: =
0px; margin-bottom: 0px; margin-left: 0px; background-color: rgb(240, =
240, 240); "><A =
href=3D"txmt://open?url=3Dfile:///usr/local/include/mtl/mtl.h&line=3D288">=
<FONT class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 12.4px;">error: =
dependent-name =91mtl::dim_n&lt;Vector&gt;::RET=92 is parsed as a =
non-type, but instantiation yields a type</SPAN></FONT></A></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; background-color: rgb(240, 240, 240); "><A =
href=3D"txmt://open?url=3Dfile:///usr/local/include/mtl/mtl.h&line=3D288">=
<FONT class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 12.4px;">note: say =
=91typename mtl::dim_n&lt;Vector&gt;::RET=92 if a type is =
meant</SPAN></FONT></A></DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; =
background-color: rgb(240, 240, 240); "><FONT class=3D"Apple-style-span" =
face=3D"Monaco" size=3D"3"><SPAN class=3D"Apple-style-span" =
style=3D"font-size: 12.4px;">make[1]: *** [mtl_norm] Error =
1</SPAN></FONT></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; background-color: rgb(240, 240, =
240); "><FONT class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 12.4px;">make: *** =
[tests] Error 2</SPAN></FONT></DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal =
normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">Any idea what is going on here?</DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; font: normal normal normal 12px/normal Helvetica; =
min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; =
">hanks</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; ">Jack</DIV><BR><DIV> <P =
style=3D"margin: 0.0px 0.0px 0.0px 0.0px"><FONT face=3D"Helvetica" =
size=3D"3" style=3D"font: 12.0px Helvetica">Jack Chessa</FONT></P> <P =
style=3D"margin: 0.0px 0.0px 0.0px 0.0px"><FONT face=3D"Helvetica" =
size=3D"3" style=3D"font: 12.0px Helvetica">Assistant =
Professor</FONT></P> <P style=3D"margin: 0.0px 0.0px 0.0px 0.0px"><FONT =
face=3D"Helvetica" size=3D"3" style=3D"font: 12.0px =
Helvetica">Department of Mechanical Engineering</FONT></P> <P =
style=3D"margin: 0.0px 0.0px 0.0px 0.0px"><FONT face=3D"Helvetica" =
size=3D"3" style=3D"font: 12.0px Helvetica">University of Texas at El =
Paso</FONT></P> <P style=3D"margin: 0.0px 0.0px 0.0px 0.0px"><FONT =
face=3D"Helvetica" size=3D"3" style=3D"font: 12.0px =
Helvetica">Email:<SPAN class=3D"Apple-tab-span" style=3D"white-space:pre">=
	</SPAN><A =
href=3D"mailto:[email protected]">[email protected]</A></FONT></P> <P =
style=3D"margin: 0.0px 0.0px 0.0px 0.0px"><FONT face=3D"Helvetica" =
size=3D"3" style=3D"font: 12.0px Helvetica">Office:<SPAN =
class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</SPAN>A309</FONT></P> <P style=3D"margin: 0.0px 0.0px 0.0px =
0.0px"><FONT face=3D"Helvetica" size=3D"3" style=3D"font: 12.0px =
Helvetica">Voice:<SPAN class=3D"Apple-tab-span" style=3D"white-space:pre">=
	</SPAN>(915) 747-6900</FONT></P> <P style=3D"margin: 0.0px 0.0px =
0.0px 0.0px"><FONT face=3D"Helvetica" size=3D"3" style=3D"font: 12.0px =
Helvetica">Fax:<SPAN class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</SPAN><SPAN class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</SPAN>(915) 747-5019</FONT></P> <P style=3D"margin: 0.0px 0.0px 0.0px =
0.0px"><FONT face=3D"Helvetica" size=3D"3" style=3D"font: 12.0px =
Helvetica">Web:<SPAN class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</SPAN>www.dmc.utep.edu/chessa</FONT></P>  </DIV><BR></BODY></HTML>=

--Apple-Mail-5-1033746185--

--===============1075270592==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/
--===============1075270592==--