Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
KNI_4.3.0
lib
kinematics
roboop
newmat
sl_ex.cpp
Go to the documentation of this file.
1
10
11
#define WANT_STREAM
12
#define WANT_MATH
13
14
#include "
include.h
"
15
#include "
solution.h
"
16
17
#ifdef use_namespace
18
using namespace
RBD_LIBRARIES;
19
#endif
20
21
22
// the cube class
23
24
class
Cube
:
public
R1_R1
25
{
Real
operator()
() {
return
x*x*x; } };
26
27
28
int
my_main
()
29
{
30
// construct the Cube object
31
Cube
cube;
32
// and then the solve object
33
OneDimSolve
cube_root(cube);
34
// Now do the solves
35
for
(
int
i=-10; i<=10; i++)
36
cout << i <<
" "
<< cube_root.
Solve
(i,0,1.5) << endl;
37
return
0;
38
}
39
40
// call my_main() - use this to catch exceptions
41
int
main
()
42
{
43
Try
44
{
45
return
my_main
();
46
}
47
Catch
(
BaseException
)
48
{
49
cout <<
BaseException::what
() <<
"\n"
;
50
}
51
CatchAll
52
{
53
cout <<
"\nProgram fails - exception generated\n\n"
;
54
}
55
return
0;
56
}
57
58
Try
#define Try
Definition:
myexcept.h:190
solution.h
Catch
#define Catch
Definition:
myexcept.h:193
Real
double Real
Definition:
include.h:307
BaseException
Definition:
myexcept.h:81
CatchAll
#define CatchAll
Definition:
myexcept.h:194
R1_R1
Definition:
solution.h:22
include.h
Cube
Definition:
sl_ex.cpp:24
my_main
int my_main()
Definition:
sl_ex.cpp:28
Cube::operator()
Real operator()()
Definition:
sl_ex.cpp:25
BaseException::what
static const char * what()
Definition:
myexcept.h:93
OneDimSolve
Definition:
solution.h:55
main
int main()
Definition:
sl_ex.cpp:41
OneDimSolve::Solve
Real Solve(Real Y, Real X, Real Dev, int Lim=100)
Definition:
solution.cpp:99
kni
Author(s): Martin Günther
autogenerated on Fri Jan 3 2020 04:01:16