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
Dmitri Naumov
ogs
Commits
b679c059
Commit
b679c059
authored
11 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
Changed one constructor of TemplatePoint.
parent
a8f93e3f
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/TemplatePoint.h
+5
-11
5 additions, 11 deletions
MathLib/TemplatePoint.h
MathLib/TemplateWeightedPoint.h
+2
-2
2 additions, 2 deletions
MathLib/TemplateWeightedPoint.h
with
7 additions
and
13 deletions
MathLib/TemplatePoint.h
+
5
−
11
View file @
b679c059
...
@@ -38,9 +38,9 @@ public:
...
@@ -38,9 +38,9 @@ public:
/** constructor - constructs a TemplatePoint object
/** constructor - constructs a TemplatePoint object
*
*
* @param
list initializer list
containing the coordinates of the point
* @param
x std::array
containing the coordinates of the point
*/
*/
TemplatePoint
(
std
::
initializer_list
<
T
>
const
&
list
);
TemplatePoint
(
std
::
array
<
T
,
DIM
>
const
&
x
);
/** constructor - constructs a TemplatePoint object
/** constructor - constructs a TemplatePoint object
\param x values for three coordinates
\param x values for three coordinates
...
@@ -97,15 +97,9 @@ TemplatePoint<T,DIM>::TemplatePoint()
...
@@ -97,15 +97,9 @@ TemplatePoint<T,DIM>::TemplatePoint()
{}
{}
template
<
typename
T
,
std
::
size_t
DIM
>
template
<
typename
T
,
std
::
size_t
DIM
>
TemplatePoint
<
T
,
DIM
>::
TemplatePoint
(
std
::
initializer_list
<
T
>
const
&
list
)
TemplatePoint
<
T
,
DIM
>::
TemplatePoint
(
std
::
array
<
T
,
DIM
>
const
&
x
)
:
{
_x
(
x
)
assert
(
list
.
size
()
==
DIM
);
{}
typename
std
::
initializer_list
<
T
>::
const_iterator
it
(
list
.
begin
());
for
(
std
::
size_t
k
(
0
);
k
<
DIM
;
k
++
)
{
_x
[
k
]
=
*
it
;
it
++
;
}
}
template
<
typename
T
,
std
::
size_t
DIM
>
template
<
typename
T
,
std
::
size_t
DIM
>
TemplatePoint
<
T
,
DIM
>::
TemplatePoint
(
T
const
*
x
)
TemplatePoint
<
T
,
DIM
>::
TemplatePoint
(
T
const
*
x
)
...
...
This diff is collapsed.
Click to expand it.
MathLib/TemplateWeightedPoint.h
+
2
−
2
View file @
b679c059
...
@@ -22,8 +22,8 @@ template <typename FP_T, typename W_T, std::size_t DIM>
...
@@ -22,8 +22,8 @@ template <typename FP_T, typename W_T, std::size_t DIM>
class
TemplateWeightedPoint
:
public
TemplatePoint
<
FP_T
,
DIM
>
class
TemplateWeightedPoint
:
public
TemplatePoint
<
FP_T
,
DIM
>
{
{
public:
public:
TemplateWeightedPoint
(
std
::
initializer_list
<
FP_T
>
const
&
list
,
W_T
weight
)
:
TemplateWeightedPoint
(
std
::
array
<
FP_T
,
DIM
>
const
&
x
,
W_T
weight
)
:
TemplatePoint
<
FP_T
,
DIM
>
(
list
),
_weight
(
weight
)
TemplatePoint
<
FP_T
,
DIM
>
(
x
),
_weight
(
weight
)
{}
{}
W_T
getWeight
()
const
W_T
getWeight
()
const
...
...
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