Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
d4495612
Commit
d4495612
authored
Dec 02, 2010
by
Alexander Wiebel
Browse files
[ADD
#453
] function that can return a WValue with double type for a
wvalueset.with any type.
parent
69618fd6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
src/dataHandler/WValueSet.h
src/dataHandler/WValueSet.h
+9
-0
src/dataHandler/WValueSetBase.h
src/dataHandler/WValueSetBase.h
+7
-0
src/dataHandler/test/WValueSetBase_test.h
src/dataHandler/test/WValueSetBase_test.h
+8
-0
No files found.
src/dataHandler/WValueSet.h
View file @
d4495612
...
...
@@ -176,6 +176,15 @@ public:
return
static_cast
<
double
>
(
m_data
[
i
]
);
}
/**
* \param i id of the WValue to retrieve
* \return The i-th WValue stored in this value set. There are size() such scalars.
*/
virtual
wmath
::
WValue
<
double
>
getWValueDouble
(
size_t
i
)
const
{
return
wmath
::
WValue
<
double
>
(
getWValue
(
i
)
);
}
/**
* Get the i'th vector
*
...
...
src/dataHandler/WValueSetBase.h
View file @
d4495612
...
...
@@ -30,6 +30,7 @@
#include <boost/variant.hpp>
#include "../common/math/WValue.h"
#include "WDataHandlerEnums.h"
#include "WExportDataHandler.h"
...
...
@@ -86,6 +87,12 @@ public:
*/
virtual
double
getScalarDouble
(
size_t
i
)
const
=
0
;
/**
* \param i id of the WValue to retrieve
* \return The i-th WValue stored in this value set. There are size() such scalars.
*/
virtual
wmath
::
WValue
<
double
>
getWValueDouble
(
size_t
i
)
const
=
0
;
/**
* \return Dimension of the values in this ValueSet
*/
...
...
src/dataHandler/test/WValueSetBase_test.h
View file @
d4495612
...
...
@@ -92,6 +92,14 @@ public:
return
255
;
}
/**
* \return The i-th WValue stored in this value set. There are size() such scalars.
*/
virtual
wmath
::
WValue
<
double
>
getWValueDouble
(
size_t
/*i*/
)
const
{
return
wmath
::
WValue
<
double
>
(
size
()
);
}
/**
* This method returns the smallest value in the valueset. It does not handle vectors, matrices and so on well. It simply returns the
* smallest value in the data array. This is especially useful for texture scaling or other statistic tools (histograms).
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment