Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
7d5f1026
Commit
7d5f1026
authored
Apr 02, 2013
by
Sebastian Eichelbaum
Browse files
Options
Browse Files
Download
Plain Diff
[MERGE]
parents
de833750
c4d50b32
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
12 deletions
+13
-12
src/core/common/math/WLinearAlgebraFunctions.h
src/core/common/math/WLinearAlgebraFunctions.h
+2
-2
src/core/common/math/WMatrix.h
src/core/common/math/WMatrix.h
+7
-6
src/core/common/math/WValue.h
src/core/common/math/WValue.h
+1
-1
src/modules/writeAmiraMesh/WMWriteAmiraMesh.cpp
src/modules/writeAmiraMesh/WMWriteAmiraMesh.cpp
+1
-1
src/modules/writeAmiraMesh/WMWriteAmiraMesh.h
src/modules/writeAmiraMesh/WMWriteAmiraMesh.h
+1
-1
tools/style/brainlint/brainlint.py
tools/style/brainlint/brainlint.py
+1
-1
No files found.
src/core/common/math/WLinearAlgebraFunctions.h
View file @
7d5f1026
...
...
@@ -122,8 +122,8 @@ void computeSVD( const WMatrix< T >& A,
WMatrix
<
T
>&
V
,
WValue
<
T
>&
S
)
{
Eigen
::
Matrix
<
T
,
-
1
,
-
1
>
eigenA
(
A
);
Eigen
::
JacobiSVD
<
Eigen
::
Matrix
<
T
,
-
1
,
-
1
>
>
svd
(
eigenA
,
Eigen
::
ComputeFullU
|
Eigen
::
ComputeFullV
);
Eigen
::
Matrix
<
T
,
Eigen
::
Dynamic
,
Eigen
::
Dynamic
>
eigenA
(
A
);
Eigen
::
JacobiSVD
<
Eigen
::
Matrix
<
T
,
Eigen
::
Dynamic
,
Eigen
::
Dynamic
>
>
svd
(
eigenA
,
Eigen
::
ComputeFullU
|
Eigen
::
ComputeFullV
);
U
=
WMatrix
<
T
>
(
svd
.
matrixU
()
);
V
=
WMatrix
<
T
>
(
svd
.
matrixV
()
);
S
=
WValue
<
T
>
(
svd
.
singularValues
()
);
...
...
src/core/common/math/WMatrix.h
View file @
7d5f1026
...
...
@@ -144,14 +144,14 @@ public:
operator
osg
::
Matrixd
()
const
;
/**
* Cast this matrix to an Eigen::Matrix< EigenDataType,
-1, -1
>() matrix.
* Cast this matrix to an Eigen::Matrix< EigenDataType,
Eigen::Dynamic, Eigen::Dynamic
>() matrix.
*
* \tparam EigenDataType Data type of Eigen matrix.
*
* \return casted matrix.
*/
template
<
typename
EigenDataType
>
operator
Eigen
::
Matrix
<
EigenDataType
,
-
1
,
-
1
>
()
const
;
operator
Eigen
::
Matrix
<
EigenDataType
,
Eigen
::
Dynamic
,
Eigen
::
Dynamic
>
()
const
;
/**
* Compares two matrices and returns true if they are equal.
...
...
@@ -233,7 +233,7 @@ private:
* \param newMatrix The source matrix.
*/
template
<
typename
EigenDataType
>
void
copyFromEigenMatrix
(
const
Eigen
::
Matrix
<
EigenDataType
,
-
1
,
-
1
>&
newMatrix
);
void
copyFromEigenMatrix
(
const
Eigen
::
Matrix
<
EigenDataType
,
Eigen
::
Dynamic
,
Eigen
::
Dynamic
>&
newMatrix
);
size_t
m_nbCols
;
//!< Number of columns of the matrix. The number of rows will be computed by (size/m_nbCols).
};
...
...
@@ -331,9 +331,9 @@ template< typename T > WMatrix< T >::operator osg::Matrixd() const
}
template
<
typename
T
>
template
<
typename
EigenDataType
>
WMatrix
<
T
>::
operator
Eigen
::
Matrix
<
EigenDataType
,
-
1
,
-
1
>
()
const
template
<
typename
EigenDataType
>
WMatrix
<
T
>::
operator
Eigen
::
Matrix
<
EigenDataType
,
Eigen
::
Dynamic
,
Eigen
::
Dynamic
>
()
const
{
Eigen
::
Matrix
<
EigenDataType
,
-
1
,
-
1
>
matrix
(
this
->
getNbRows
(),
this
->
getNbCols
()
);
Eigen
::
Matrix
<
EigenDataType
,
Eigen
::
Dynamic
,
Eigen
::
Dynamic
>
matrix
(
this
->
getNbRows
(),
this
->
getNbCols
()
);
for
(
int
row
=
0
;
row
<
matrix
.
rows
();
++
row
)
{
for
(
int
col
=
0
;
col
<
matrix
.
cols
();
++
col
)
...
...
@@ -526,7 +526,8 @@ template< typename T > bool WMatrix< T >::isIdentity( T delta ) const
}
template
<
typename
T
>
template
<
typename
EigenDataType
>
void
WMatrix
<
T
>::
copyFromEigenMatrix
(
const
Eigen
::
Matrix
<
EigenDataType
,
-
1
,
-
1
>&
newMatrix
)
template
<
typename
EigenDataType
>
void
WMatrix
<
T
>::
copyFromEigenMatrix
(
const
Eigen
::
Matrix
<
EigenDataType
,
Eigen
::
Dynamic
,
Eigen
::
Dynamic
>&
newMatrix
)
{
m_nbCols
=
static_cast
<
size_t
>
(
newMatrix
.
cols
()
);
for
(
int
row
=
0
;
row
<
newMatrix
.
rows
();
++
row
)
...
...
src/core/common/math/WValue.h
View file @
7d5f1026
...
...
@@ -392,7 +392,7 @@ private:
* \param newValues The source Eigen::VectorX.
*/
template
<
typename
EigenDataType
>
void
copyFromEigenVector
(
const
Eigen
::
Matrix
<
EigenDataType
,
-
1
,
1
>&
newValues
)
void
copyFromEigenVector
(
const
Eigen
::
Matrix
<
EigenDataType
,
Eigen
::
Dynamic
,
1
>&
newValues
)
{
for
(
std
::
size_t
i
=
0
;
i
<
m_components
.
size
();
++
i
)
{
...
...
src/modules/writeAmiraMesh/WMWriteAmiraMesh.cpp
View file @
7d5f1026
...
...
@@ -2,7 +2,7 @@
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 20
09
OpenWalnut Community, BSV-Leipzig and CNCF-CBS
// Copyright 20
13
OpenWalnut Community, BSV-Leipzig and CNCF-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
...
...
src/modules/writeAmiraMesh/WMWriteAmiraMesh.h
View file @
7d5f1026
...
...
@@ -2,7 +2,7 @@
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 20
09
OpenWalnut Community, BSV-Leipzig and CNCF-CBS
// Copyright 20
13
OpenWalnut Community, BSV-Leipzig and CNCF-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
...
...
tools/style/brainlint/brainlint.py
View file @
7d5f1026
...
...
@@ -1059,7 +1059,7 @@ def CheckForCompleteCommentHeader(filename, lines, error):
and
(
len
(
lines
[
3
]
)
==
52
)
and
re
.
match
(
r
'//'
,
lines
[
4
])
and
(
len
(
lines
[
4
]
)
==
2
)
and
re
.
match
(
r
'// Copyright 20
09
'
,
lines
[
5
])
#Checks only the first part of the line. Other copyrights could appear.
and
re
.
match
(
r
'// Copyright 20'
,
lines
[
5
])
#Checks only the first part of the line. Other copyrights could appear.
# and ( len( lines[5] ) == 18 ) #Checks only the first part of the line. Other copyrights could appear.
and
re
.
match
(
r
'// For more information see http://www.openwalnut.org/copying'
,
lines
[
6
])
and
(
len
(
lines
[
6
]
)
==
61
)
...
...
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