Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
94cff5f1
There was an error fetching the commit references. Please try again later.
Commit
94cff5f1
authored
5 years ago
by
Tomáš Oberhuber
Committed by
Tomáš Oberhuber
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Renaming Vector_impl.h to Vector.hpp and deleting vector operation functions.
parent
6dbb8715
No related branches found
No related tags found
1 merge request
!29
Revision
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/TNL/Containers/Vector.h
+1
-150
1 addition, 150 deletions
src/TNL/Containers/Vector.h
src/TNL/Containers/Vector.hpp
+0
-3
0 additions, 3 deletions
src/TNL/Containers/Vector.hpp
with
1 addition
and
153 deletions
src/TNL/Containers/Vector.h
+
1
−
150
View file @
94cff5f1
...
...
@@ -305,156 +305,7 @@ public:
void
computeExclusivePrefixSum
(
const
IndexType
begin
,
const
IndexType
end
);
};
/**
* \brief Returns the maximum value out of all vector elements.
*
*/
template
<
typename
Real
,
typename
Device
,
typename
Index
,
typename
ResultType
=
Real
>
ResultType
max
(
const
Vector
<
Real
,
Device
,
Index
>&
v
);
/**
* \brief Returns the minimum value out of all vector elements.
*
*/
template
<
typename
Real
,
typename
Device
,
typename
Index
,
typename
ResultType
=
Real
>
ResultType
min
(
const
Vector
<
Real
,
Device
,
Index
>&
v
);
/**
* \brief Returns the maximum absolute value out of all vector elements.
*
*/
template
<
typename
Real
,
typename
Device
,
typename
Index
,
typename
ResultType
=
Real
>
ResultType
absMax
(
const
Vector
<
Real
,
Device
,
Index
>&
v
);
/**
* \brief Returns the minimum absolute value out of all vector elements.
*
*/
template
<
typename
Real
,
typename
Device
,
typename
Index
,
typename
ResultType
=
Real
>
ResultType
absMin
(
const
Vector
<
Real
,
Device
,
Index
>&
v
);
/**
* \brief Returns the length of this vector in p-dimensional vector space.
*
* \tparam
* \param p Number specifying the dimension of vector space.
*
*/
template
<
typename
Real
,
typename
Device
,
typename
Index
,
typename
Scalar
,
typename
ResultType
=
Real
>
ResultType
lpNorm
(
const
Vector
<
Real
,
Device
,
Index
>&
v
,
const
Scalar
p
);
/**
* \brief Returns sum of all vector elements.
*
*/
template
<
typename
Real
,
typename
Device
,
typename
Index
,
template
<
typename
ResultType
=
RealType
>
ResultType
sum
(
const
Vector
<
Real
,
Device
,
Index
>
&
v
);
/**
* \brief Returns maximal difference between elements of this vector and vector \e v.
*
* \tparam Vector Type of vector.
* \param v Reference to another vector of the same size as this vector.
*
*/
template
<
typename
Real
,
typename
Device
,
typename
Index
,
typename
Vector_
,
typename
ResultType
=
Real
>
ResultType
differenceMax
(
const
Vector
<
Real
,
Device
,
Index
>&
v
,
const
Vector_
&
v2
);
/**
* \brief Returns minimal difference between elements of this vector and vector \e v.
*
* \tparam Vector Type of vector.
* \param v Reference to another vector of the same size as this vector.
*
*/
template
<
typename
Real
,
typename
Device
,
typename
Index
,
typename
Vector_
,
typename
ResultType
=
Real
>
ResultType
differenceMin
(
const
Vector
<
Real
,
Device
,
Index
>&
v
,
const
Vector
&
v2
);
/**
* \brief Returns maximal absolute difference between elements of this vector and vector \e v.
*
* \tparam Vector Type of vector.
* \param v Reference to another vector of the same size as this vector.
*
*/
template
<
typename
Real
,
typename
Device
,
typename
Index
,
typename
Vector_
,
typename
ResultType
=
Real
>
ResultType
differenceAbsMax
(
const
Vector
<
Real
,
Device
,
Index
>&
v
,
const
Vector
&
v2
);
/**
* \brief Returns minimal absolute difference between elements of this vector and vector \e v.
*
* \tparam Vector Type of vector.
* \param v Reference to another vector of the same size as this vector.
*
*/
template
<
typename
Real
,
typename
Device
,
typename
Index
,
typename
Vector_
>
Real
differenceAbsMin
(
const
Vector
<
Real
,
Device
,
Index
>&
v
,
const
Vector
&
v2
);
/**
* \brief Returns difference between L^p norms of this vector and vector \e v.
*
* See also \ref lpNorm.
*
* \param v Reference to another vector.
* \param p Number specifying the dimension of vector space.
*
*/
template
<
typename
Real
,
typename
Device
,
typename
Index
,
typename
Vector_
,
typename
Scalar
,
typename
ResultType
=
RealType
>
ResultType
differenceLpNorm
(
const
Vector
<
Real
,
Device
,
Index
>&
v
,
const
Vector
&
v2
,
const
Scalar
p
);
/**
* \brief Returns difference between sums of elements of this vector and vector \e v.
*
* \param v Reference to another vector.
*
*/
template
<
typename
Real
,
typename
Device
,
typename
Index
,
typename
Vector_
,
typename
ResultType
=
RealType
>
ResultType
differenceSum
(
const
Vector
<
Real
,
Device
,
Index
>&
v
,
const
Vector
&
v2
);
}
// namespace Containers
}
// namespace TNL
#include
<TNL/Containers/Vector
_impl
.h>
#include
<TNL/Containers/Vector.h
pp
>
This diff is collapsed.
Click to expand it.
src/TNL/Containers/Vector
_impl
.h
→
src/TNL/Containers/Vector.h
pp
+
0
−
3
View file @
94cff5f1
...
...
@@ -212,7 +212,6 @@ ResultType Vector< Real, Device, Index >::lpNorm( const Scalar p ) const
return
Algorithms
::
VectorOperations
<
Device
>::
template
getVectorLpNorm
<
Vector
,
ResultType
>(
*
this
,
p
);
}
template
<
typename
Real
,
typename
Device
,
typename
Index
>
...
...
@@ -222,7 +221,6 @@ ResultType Vector< Real, Device, Index >::sum() const
return
Algorithms
::
VectorOperations
<
Device
>::
template
getVectorSum
<
Vector
,
ResultType
>(
*
this
);
}
template
<
typename
Real
,
typename
Device
,
typename
Index
>
...
...
@@ -232,7 +230,6 @@ Real Vector< Real, Device, Index >::differenceMax( const VectorT& v ) const
return
Algorithms
::
VectorOperations
<
Device
>::
getVectorDifferenceMax
(
*
this
,
v
);
}
template
<
typename
Real
,
typename
Device
,
typename
Index
>
...
...
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