Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
qwt
src
qwt_transform.cpp
Go to the documentation of this file.
1
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
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
13
#if QT_VERSION < 0x040601
14
#define qExp(x) ::exp(x)
15
#endif
16
18
const
double
QwtLogTransform::LogMin
= 1.0e-150;
19
21
const
double
QwtLogTransform::LogMax
= 1.0e150;
22
24
QwtTransform::QwtTransform
()
25
{
26
}
27
29
QwtTransform::~QwtTransform
()
30
{
31
}
32
37
double
QwtTransform::bounded
(
double
value )
const
38
{
39
return
value;
40
}
41
43
QwtNullTransform::QwtNullTransform
():
44
QwtTransform
()
45
{
46
}
47
49
QwtNullTransform::~QwtNullTransform
()
50
{
51
}
52
57
double
QwtNullTransform::transform
(
double
value )
const
58
{
59
return
value;
60
}
61
66
double
QwtNullTransform::invTransform
(
double
value )
const
67
{
68
return
value;
69
}
70
72
QwtTransform
*
QwtNullTransform::copy
()
const
73
{
74
return
new
QwtNullTransform
();
75
}
76
78
QwtLogTransform::QwtLogTransform
():
79
QwtTransform
()
80
{
81
}
82
84
QwtLogTransform::~QwtLogTransform
()
85
{
86
}
87
92
double
QwtLogTransform::transform
(
double
value )
const
93
{
94
return ::log( value );
95
}
96
101
double
QwtLogTransform::invTransform
(
double
value )
const
102
{
103
return
qExp
( value );
104
}
105
110
double
QwtLogTransform::bounded
(
double
value )
const
111
{
112
return
qBound(
LogMin
, value,
LogMax
);
113
}
114
116
QwtTransform
*
QwtLogTransform::copy
()
const
117
{
118
return
new
QwtLogTransform
();
119
}
120
125
QwtPowerTransform::QwtPowerTransform
(
double
exponent ):
126
QwtTransform
(),
127
d_exponent( exponent )
128
{
129
}
130
132
QwtPowerTransform::~QwtPowerTransform
()
133
{
134
}
135
140
double
QwtPowerTransform::transform
(
double
value )
const
141
{
142
if
( value < 0.0 )
143
return
-qPow( -value, 1.0 /
d_exponent
);
144
else
145
return
qPow( value, 1.0 /
d_exponent
);
146
147
}
148
153
double
QwtPowerTransform::invTransform
(
double
value )
const
154
{
155
if
( value < 0.0 )
156
return
-qPow( -value,
d_exponent
);
157
else
158
return
qPow( value,
d_exponent
);
159
}
160
162
QwtTransform
*
QwtPowerTransform::copy
()
const
163
{
164
return
new
QwtPowerTransform
(
d_exponent
);
165
}
QwtPowerTransform::QwtPowerTransform
QwtPowerTransform(double exponent)
Definition:
qwt_transform.cpp:125
QwtLogTransform::invTransform
virtual double invTransform(double value) const
Definition:
qwt_transform.cpp:101
QwtLogTransform::QwtLogTransform
QwtLogTransform()
Constructor.
Definition:
qwt_transform.cpp:78
QwtPowerTransform::~QwtPowerTransform
virtual ~QwtPowerTransform()
Destructor.
Definition:
qwt_transform.cpp:132
QwtNullTransform::~QwtNullTransform
virtual ~QwtNullTransform()
Destructor.
Definition:
qwt_transform.cpp:49
QwtLogTransform::transform
virtual double transform(double value) const
Definition:
qwt_transform.cpp:92
QwtTransform::bounded
virtual double bounded(double value) const
Definition:
qwt_transform.cpp:37
QwtLogTransform::copy
virtual QwtTransform * copy() const
Definition:
qwt_transform.cpp:116
qwt_transform.h
QwtPowerTransform::invTransform
virtual double invTransform(double value) const
Definition:
qwt_transform.cpp:153
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
QwtLogTransform::LogMin
static const double LogMin
Smallest allowed value for logarithmic scales: 1.0e-150.
Definition:
qwt_transform.h:113
QwtNullTransform::invTransform
virtual double invTransform(double value) const
Definition:
qwt_transform.cpp:66
QwtNullTransform::QwtNullTransform
QwtNullTransform()
Constructor.
Definition:
qwt_transform.cpp:43
QwtTransform::~QwtTransform
virtual ~QwtTransform()
Destructor.
Definition:
qwt_transform.cpp:29
QwtNullTransform::copy
virtual QwtTransform * copy() const
Definition:
qwt_transform.cpp:72
QwtPowerTransform::copy
virtual QwtTransform * copy() const
Definition:
qwt_transform.cpp:162
QwtLogTransform::~QwtLogTransform
virtual ~QwtLogTransform()
Destructor.
Definition:
qwt_transform.cpp:84
QwtTransform::QwtTransform
QwtTransform()
Constructor.
Definition:
qwt_transform.cpp:24
QwtPowerTransform::transform
virtual double transform(double value) const
Definition:
qwt_transform.cpp:140
QwtNullTransform::transform
virtual double transform(double value) const
Definition:
qwt_transform.cpp:57
QwtPowerTransform::d_exponent
const double d_exponent
Definition:
qwt_transform.h:137
qExp
#define qExp(x)
Definition:
qwt_transform.cpp:14
QwtLogTransform::bounded
virtual double bounded(double value) const
Definition:
qwt_transform.cpp:110
plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:18