Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Karsten Rink
ogs
Commits
6be85d01
Commit
6be85d01
authored
9 years ago
by
Dmitri Naumov
Committed by
Dmitri Naumov
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[MaL] Use std namespace.
parent
844d6081
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/LinAlg/Sparse/NestedDissectionPermutation/CRSMatrixReordered.cpp
+1
-1
1 addition, 1 deletion
...Sparse/NestedDissectionPermutation/CRSMatrixReordered.cpp
MathLib/MathTools.cpp
+4
-4
4 additions, 4 deletions
MathLib/MathTools.cpp
with
5 additions
and
5 deletions
MathLib/LinAlg/Sparse/NestedDissectionPermutation/CRSMatrixReordered.cpp
+
1
−
1
View file @
6be85d01
...
@@ -64,7 +64,7 @@ void CRSMatrixReordered::reorderMatrix(unsigned const*const op_perm, unsigned co
...
@@ -64,7 +64,7 @@ void CRSMatrixReordered::reorderMatrix(unsigned const*const op_perm, unsigned co
delete
[]
pos
;
delete
[]
pos
;
for
(
i
=
0
;
i
<
size
;
++
i
)
for
(
i
=
0
;
i
<
size
;
++
i
)
BaseLib
::
quicksort
(
jAn
,
static_cast
<
size_t
>
(
iAn
[
i
]),
static_cast
<
size_t
>
(
iAn
[
i
+
1
]),
An
);
BaseLib
::
quicksort
(
jAn
,
static_cast
<
std
::
size_t
>
(
iAn
[
i
]),
static_cast
<
std
::
size_t
>
(
iAn
[
i
+
1
]),
An
);
std
::
swap
(
iAn
,
_row_ptr
);
std
::
swap
(
iAn
,
_row_ptr
);
std
::
swap
(
jAn
,
_col_idx
);
std
::
swap
(
jAn
,
_col_idx
);
...
...
This diff is collapsed.
Click to expand it.
MathLib/MathTools.cpp
+
4
−
4
View file @
6be85d01
...
@@ -34,12 +34,12 @@ double calcProjPntToLineAndDists(const double p[3], const double a[3],
...
@@ -34,12 +34,12 @@ double calcProjPntToLineAndDists(const double p[3], const double a[3],
// compute projected point
// compute projected point
double
proj_pnt
[
3
];
double
proj_pnt
[
3
];
for
(
size_t
k
(
0
);
k
<
3
;
k
++
)
for
(
std
::
size_t
k
(
0
);
k
<
3
;
k
++
)
proj_pnt
[
k
]
=
a
[
k
]
+
lambda
*
v
[
k
];
proj_pnt
[
k
]
=
a
[
k
]
+
lambda
*
v
[
k
];
d0
=
sqrt
(
sqrDist
(
proj_pnt
,
a
));
d0
=
std
::
sqrt
(
sqrDist
(
proj_pnt
,
a
));
return
sqrt
(
sqrDist
(
p
,
proj_pnt
));
return
std
::
sqrt
(
sqrDist
(
p
,
proj_pnt
));
}
}
double
getAngle
(
const
double
p0
[
3
],
const
double
p1
[
3
],
const
double
p2
[
3
])
double
getAngle
(
const
double
p0
[
3
],
const
double
p1
[
3
],
const
double
p2
[
3
])
...
@@ -48,7 +48,7 @@ double getAngle (const double p0[3], const double p1[3], const double p2[3])
...
@@ -48,7 +48,7 @@ double getAngle (const double p0[3], const double p1[3], const double p2[3])
const
double
v1
[
3
]
=
{
p2
[
0
]
-
p1
[
0
],
p2
[
1
]
-
p1
[
1
],
p2
[
2
]
-
p1
[
2
]};
const
double
v1
[
3
]
=
{
p2
[
0
]
-
p1
[
0
],
p2
[
1
]
-
p1
[
1
],
p2
[
2
]
-
p1
[
2
]};
// apply Cauchy Schwarz inequality
// apply Cauchy Schwarz inequality
return
acos
(
scalarProduct
<
double
,
3
>
(
v0
,
v1
)
/
(
sqrt
(
scalarProduct
<
double
,
3
>
(
v0
,
v0
))
*
sqrt
(
scalarProduct
<
double
,
3
>
(
v1
,
v1
))));
return
std
::
acos
(
scalarProduct
<
double
,
3
>
(
v0
,
v1
)
/
(
std
::
sqrt
(
scalarProduct
<
double
,
3
>
(
v0
,
v0
))
*
sqrt
(
scalarProduct
<
double
,
3
>
(
v1
,
v1
))));
}
}
...
...
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