Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs-feliks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Feliks Kiszkurno
ogs-feliks
Commits
c548054e
Commit
c548054e
authored
12 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
Removed unused function sqrNrm2 from MathTools.{h,cpp}.
parent
a15965cd
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MathLib/MathTools.cpp
+2
-7
2 additions, 7 deletions
MathLib/MathTools.cpp
MathLib/MathTools.h
+4
-7
4 additions, 7 deletions
MathLib/MathTools.h
with
6 additions
and
14 deletions
MathLib/MathTools.cpp
+
2
−
7
View file @
c548054e
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
#include
"MathTools.h"
#include
"MathTools.h"
namespace
MathLib
{
namespace
MathLib
{
void
crossProd
(
const
double
u
[
3
],
const
double
v
[
3
],
double
r
[
3
])
void
crossProd
(
const
double
u
[
3
],
const
double
v
[
3
],
double
r
[
3
])
{
{
r
[
0
]
=
u
[
1
]
*
v
[
2
]
-
u
[
2
]
*
v
[
1
];
r
[
0
]
=
u
[
1
]
*
v
[
2
]
-
u
[
2
]
*
v
[
1
];
...
@@ -41,11 +41,6 @@ double calcProjPntToLineAndDists(const double p[3], const double a[3],
...
@@ -41,11 +41,6 @@ double calcProjPntToLineAndDists(const double p[3], const double a[3],
return
sqrt
(
sqrDist
(
p
,
proj_pnt
));
return
sqrt
(
sqrDist
(
p
,
proj_pnt
));
}
}
double
sqrNrm2
(
const
GeoLib
::
Point
*
p0
)
{
return
scpr
<
double
,
3
>
(
p0
->
getCoords
(),
p0
->
getCoords
());
}
double
sqrDist
(
const
GeoLib
::
Point
*
p0
,
const
GeoLib
::
Point
*
p1
)
double
sqrDist
(
const
GeoLib
::
Point
*
p0
,
const
GeoLib
::
Point
*
p1
)
{
{
const
double
v
[
3
]
=
{(
*
p1
)[
0
]
-
(
*
p0
)[
0
],
(
*
p1
)[
1
]
-
(
*
p0
)[
1
],
(
*
p1
)[
2
]
-
(
*
p0
)[
2
]};
const
double
v
[
3
]
=
{(
*
p1
)[
0
]
-
(
*
p0
)[
0
],
(
*
p1
)[
1
]
-
(
*
p0
)[
1
],
(
*
p1
)[
2
]
-
(
*
p0
)[
2
]};
...
...
This diff is collapsed.
Click to expand it.
MathLib/MathTools.h
+
4
−
7
View file @
c548054e
...
@@ -15,9 +15,9 @@
...
@@ -15,9 +15,9 @@
#ifndef MATHTOOLS_H_
#ifndef MATHTOOLS_H_
#define MATHTOOLS_H_
#define MATHTOOLS_H_
#include
<vector>
#include
<cmath>
#include
<cmath>
#include
<limits>
#include
<limits>
#include
<vector>
#ifdef _OPENMP
#ifdef _OPENMP
#include
<omp.h>
#include
<omp.h>
...
@@ -25,8 +25,8 @@
...
@@ -25,8 +25,8 @@
#include
"Point.h"
#include
"Point.h"
namespace
MathLib
{
namespace
MathLib
{
/**
/**
* standard inner product in R^N
* standard inner product in R^N
* \param v0 array of type T representing the vector
* \param v0 array of type T representing the vector
...
@@ -35,7 +35,7 @@ namespace MathLib {
...
@@ -35,7 +35,7 @@ namespace MathLib {
template
<
typename
T
,
int
N
>
inline
template
<
typename
T
,
int
N
>
inline
T
scpr
(
T
const
*
const
v0
,
T
const
*
const
v1
)
T
scpr
(
T
const
*
const
v0
,
T
const
*
const
v1
)
{
{
T
res
(
v0
[
0
]
*
v1
[
0
]);
T
res
(
v0
[
0
]
*
v1
[
0
]);
#ifdef _OPENMP
#ifdef _OPENMP
OPENMP_LOOP_TYPE
k
;
OPENMP_LOOP_TYPE
k
;
...
@@ -110,9 +110,6 @@ double calcProjPntToLineAndDists(const double p[3], const double a[3],
...
@@ -110,9 +110,6 @@ double calcProjPntToLineAndDists(const double p[3], const double a[3],
*/
*/
bool
checkDistance
(
GeoLib
::
Point
const
&
p0
,
GeoLib
::
Point
const
&
p1
,
double
squaredDistance
);
bool
checkDistance
(
GeoLib
::
Point
const
&
p0
,
GeoLib
::
Point
const
&
p1
,
double
squaredDistance
);
/** squared euklid norm of the vector p0 */
double
sqrNrm2
(
const
GeoLib
::
Point
*
const
p0
);
/** squared dist between GeoLib::Points p0 and p1 */
/** squared dist between GeoLib::Points p0 and p1 */
double
sqrDist
(
const
GeoLib
::
Point
*
p0
,
const
GeoLib
::
Point
*
p1
);
double
sqrDist
(
const
GeoLib
::
Point
*
p0
,
const
GeoLib
::
Point
*
p1
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment