Main Page
Related Pages
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
+
Enumerations
a
b
c
d
e
g
i
l
m
o
p
r
s
t
v
+
Enumerator
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
x
y
+
Classes
Class List
Class Hierarchy
+
Class Members
+
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
_
a
b
c
d
e
f
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
+
Enumerations
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
w
+
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
+
Properties
a
b
c
d
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Related Functions
:
a
b
c
d
e
f
g
i
m
o
q
r
s
v
w
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
_
a
b
c
d
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
p
q
r
s
t
u
v
w
x
z
+
Enumerations
a
b
c
d
e
f
h
i
k
l
n
o
r
t
u
v
x
+
Enumerator
b
c
d
e
f
h
i
k
l
m
n
o
p
r
t
u
v
w
x
+
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
3rdparty
qwt
src
qwt_transform.cpp
Go to the documentation of this file.
1
/******************************************************************************
2
* Qwt Widget Library
3
* Copyright (C) 1997 Josef Wilgen
4
* Copyright (C) 2002 Uwe Rathmann
5
*
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the Qwt License, Version 1.0
8
*****************************************************************************/
9
10
#include "
qwt_transform.h
"
11
#include "
qwt_math.h
"
12
14
const
double
QwtLogTransform::LogMin
= 1.0e-150;
15
17
const
double
QwtLogTransform::LogMax
= 1.0e150;
18
20
QwtTransform::QwtTransform
()
21
{
22
}
23
25
QwtTransform::~QwtTransform
()
26
{
27
}
28
33
double
QwtTransform::bounded
(
double
value
)
const
34
{
35
return
value;
36
}
37
39
QwtNullTransform::QwtNullTransform
():
40
QwtTransform
()
41
{
42
}
43
45
QwtNullTransform::~QwtNullTransform
()
46
{
47
}
48
53
double
QwtNullTransform::transform
(
double
value
)
const
54
{
55
return
value;
56
}
57
62
double
QwtNullTransform::invTransform
(
double
value
)
const
63
{
64
return
value;
65
}
66
68
QwtTransform
*
QwtNullTransform::copy
()
const
69
{
70
return
new
QwtNullTransform
();
71
}
72
74
QwtLogTransform::QwtLogTransform
():
75
QwtTransform
()
76
{
77
}
78
80
QwtLogTransform::~QwtLogTransform
()
81
{
82
}
83
88
double
QwtLogTransform::transform
(
double
value
)
const
89
{
90
return
std::log( value );
91
}
92
97
double
QwtLogTransform::invTransform
(
double
value
)
const
98
{
99
return
std::exp( value );
100
}
101
106
double
QwtLogTransform::bounded
(
double
value
)
const
107
{
108
return
qBound(
LogMin
, value,
LogMax
);
109
}
110
112
QwtTransform
*
QwtLogTransform::copy
()
const
113
{
114
return
new
QwtLogTransform
();
115
}
116
121
QwtPowerTransform::QwtPowerTransform
(
double
exponent ):
122
QwtTransform
(),
123
m_exponent( exponent )
124
{
125
}
126
128
QwtPowerTransform::~QwtPowerTransform
()
129
{
130
}
131
136
double
QwtPowerTransform::transform
(
double
value
)
const
137
{
138
if
( value < 0.0 )
139
return
-std::pow( -value, 1.0 /
m_exponent
);
140
else
141
return
std::pow( value, 1.0 /
m_exponent
);
142
143
}
144
149
double
QwtPowerTransform::invTransform
(
double
value
)
const
150
{
151
if
( value < 0.0 )
152
return
-std::pow( -value,
m_exponent
);
153
else
154
return
std::pow( value,
m_exponent
);
155
}
156
158
QwtTransform
*
QwtPowerTransform::copy
()
const
159
{
160
return
new
QwtPowerTransform
(
m_exponent
);
161
}
QwtPowerTransform::QwtPowerTransform
QwtPowerTransform(double exponent)
Definition:
qwt_transform.cpp:121
QwtLogTransform::bounded
virtual double bounded(double value) const QWT_OVERRIDE
Definition:
qwt_transform.cpp:106
QwtLogTransform::QwtLogTransform
QwtLogTransform()
Constructor.
Definition:
qwt_transform.cpp:74
QwtPowerTransform::~QwtPowerTransform
virtual ~QwtPowerTransform()
Destructor.
Definition:
qwt_transform.cpp:128
QwtNullTransform::~QwtNullTransform
virtual ~QwtNullTransform()
Destructor.
Definition:
qwt_transform.cpp:45
QwtNullTransform::invTransform
virtual double invTransform(double value) const QWT_OVERRIDE
Definition:
qwt_transform.cpp:62
QwtPowerTransform::copy
virtual QwtTransform * copy() const QWT_OVERRIDE
Definition:
qwt_transform.cpp:158
QwtLogTransform::transform
virtual double transform(double value) const QWT_OVERRIDE
Definition:
qwt_transform.cpp:88
QwtLogTransform::invTransform
virtual double invTransform(double value) const QWT_OVERRIDE
Definition:
qwt_transform.cpp:97
qwt_transform.h
QwtPowerTransform::transform
virtual double transform(double value) const QWT_OVERRIDE
Definition:
qwt_transform.cpp:136
QwtNullTransform::transform
virtual double transform(double value) const QWT_OVERRIDE
Definition:
qwt_transform.cpp:53
QwtTransform
A transformation between coordinate systems.
Definition:
qwt_transform.h:35
QwtLogTransform::LogMax
static const double LogMax
Largest allowed value for logarithmic scales: 1.0e150.
Definition:
qwt_transform.h:114
qwt_math.h
QwtPowerTransform::invTransform
virtual double invTransform(double value) const QWT_OVERRIDE
Definition:
qwt_transform.cpp:149
QwtNullTransform::copy
virtual QwtTransform * copy() const QWT_OVERRIDE
Definition:
qwt_transform.cpp:68
QwtLogTransform::LogMin
static const double LogMin
Smallest allowed value for logarithmic scales: 1.0e-150.
Definition:
qwt_transform.h:113
QwtNullTransform::QwtNullTransform
QwtNullTransform()
Constructor.
Definition:
qwt_transform.cpp:39
QwtTransform::~QwtTransform
virtual ~QwtTransform()
Destructor.
Definition:
qwt_transform.cpp:25
QwtLogTransform::copy
virtual QwtTransform * copy() const QWT_OVERRIDE
Definition:
qwt_transform.cpp:112
QwtLogTransform::~QwtLogTransform
virtual ~QwtLogTransform()
Destructor.
Definition:
qwt_transform.cpp:80
QwtTransform::QwtTransform
QwtTransform()
Constructor.
Definition:
qwt_transform.cpp:20
value
Definition:
core.h:1131
QwtPowerTransform::m_exponent
const double m_exponent
Definition:
qwt_transform.h:137
QwtTransform::bounded
virtual double bounded(double value) const
Definition:
qwt_transform.cpp:33
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Jun 19 2023 03:01:39