Overture
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
Overture.v25.d
include
QuadraticMapping.h
Go to the documentation of this file.
1
#ifndef QUADRATIC_MAPPING_H
2
#define QUADRATIC_MAPPING_H
3
4
#include "
Mapping.h
"
5
6
//-------------------------------------------------------------
7
// Define a quadratic curve or surface
8
//
9
//-------------------------------------------------------------
10
class
QuadraticMapping
:
public
Mapping
11
{
12
13
public
:
14
15
enum
QuadraticOption
16
{
17
parabola
,
18
hyperbola
19
};
20
21
QuadraticMapping
();
22
// Copy constructor is deep by default
23
QuadraticMapping
(
const
QuadraticMapping
&,
const
CopyType
copyType=
DEEP
);
24
25
~QuadraticMapping
();
26
27
QuadraticMapping
&
operator =
(
const
QuadraticMapping
& X0 );
28
29
int
chooseQuadratic
(
QuadraticOption
option,
int
rangeDimension
=2 );
30
int
setParameters
(
real
c0x,
31
real
c1x,
32
real
c0y,
33
real
c1y,
34
real
a00,
35
real
a10,
36
real
a01,
37
real
a20,
38
real
a11,
39
real
a02,
40
real
signForHyperbola
= 1. );
41
42
void
map
(
const
realArray
&
r
,
realArray
& x,
realArray
& xr =
Overture::nullRealDistributedArray
(),
43
MappingParameters
& params =
Overture::nullMappingParameters
() );
44
45
virtual
int
get
(
const
GenericDataBase
& dir,
const
aString
& name);
// get from a database file
46
virtual
int
put
(
GenericDataBase
& dir,
const
aString
& name)
const
;
// put to a database file
47
48
Mapping
*
make
(
const
aString
&
mappingClassName
);
49
aString
getClassName
()
const
{
return
QuadraticMapping::className
; }
50
51
int
update
(
MappingInformation
& mapInfo ) ;
52
53
protected
:
54
aString
className
;
55
56
QuadraticOption
quadraticOption
;
57
58
real
a
[3][3],
c
[2][2];
// quadratic parameters
59
real
signForHyperbola
;
60
61
private
:
62
63
//
64
// Virtual member functions used only through class ReferenceCounting:
65
//
66
virtual
ReferenceCounting
&
operator=
(
const
ReferenceCounting
& x)
67
{
return
operator=
((
QuadraticMapping
&)x); }
68
virtual
void
reference(
const
ReferenceCounting
& x)
69
{ reference((
QuadraticMapping
&)x); }
// *** Conversion to this class for the virtual = ****
70
virtual
ReferenceCounting
* virtualConstructor(
const
CopyType
ct =
DEEP
)
const
71
{ return ::new
QuadraticMapping
(*
this
, ct); }
72
73
};
74
75
76
#endif
Generated on Fri Jan 4 2013 10:17:58 for Overture by
1.8.3