mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-06-20 00:06:55 +01:00
initial commit
This commit is contained in:
24
examples/Makefile.am
Normal file
24
examples/Makefile.am
Normal file
@ -0,0 +1,24 @@
|
||||
if CC_GNU
|
||||
COM_CFLAGS = -Wall -W -pedantic
|
||||
else
|
||||
if CC_INTEL
|
||||
COM_CFLAGS = -Wall
|
||||
endif
|
||||
endif
|
||||
|
||||
if CXX_GNU
|
||||
COM_CXXFLAGS = -Wall -W -pedantic
|
||||
else
|
||||
if CXX_INTEL
|
||||
COM_CXXFLAGS = -Wall
|
||||
endif
|
||||
endif
|
||||
|
||||
noinst_PROGRAMS = \
|
||||
ex_test
|
||||
|
||||
ex_test_SOURCES = ex_test.cpp
|
||||
ex_test_CFLAGS = -g -O2
|
||||
ex_test_LDFLAGS = -L../latan/.libs -llatan
|
||||
|
||||
ACLOCAL_AMFLAGS = -I .buildutils/m4
|
20
examples/ex_test.cpp
Normal file
20
examples/ex_test.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
#include <iostream>
|
||||
#include <latan/Global.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace Latan;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
DMat m(2,2);
|
||||
|
||||
m(0,6) = 3;
|
||||
m(1,0) = 2.5;
|
||||
m(0,1) = -1;
|
||||
m(1,1) = m(1,0) + m(0,1);
|
||||
cout << "Here is the matrix m:\n" << m << endl;
|
||||
DVec v(2);
|
||||
v(0) = 4;
|
||||
v(1) = v(0) - 1;
|
||||
cout << "Here is the vector v:\n" << v << endl;
|
||||
}
|
1
examples/latan
Symbolic link
1
examples/latan
Symbolic link
@ -0,0 +1 @@
|
||||
../latan
|
Reference in New Issue
Block a user