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
4f7c7906
There was an error fetching the commit references. Please try again later.
Commit
4f7c7906
authored
6 years ago
by
Nina Džugasová
Committed by
Tomáš Oberhuber
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Finished documentation of Vector.
parent
b18a6727
No related branches found
No related tags found
1 merge request
!19
Nina
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/TNL/Containers/Vector.h
+36
-2
36 additions, 2 deletions
src/TNL/Containers/Vector.h
with
36 additions
and
2 deletions
src/TNL/Containers/Vector.h
+
36
−
2
View file @
4f7c7906
...
...
@@ -223,8 +223,6 @@ class Vector
/**
* \brief Returns the result of following: thisMultiplicator * this + multiplicator1 * v1 + multiplicator2 * v2.
*
* \param
*/
template
<
typename
Vector1
,
typename
Vector2
,
typename
Scalar1
,
typename
Scalar2
,
typename
Scalar3
=
Real
>
void
addVectors
(
const
Vector1
&
v1
,
...
...
@@ -233,12 +231,48 @@ class Vector
const
Scalar2
multiplicator2
,
const
Scalar3
thisMultiplicator
=
1.0
);
/**
* \brief Returns specific sums of elements of this vector.
*
* Goes in order from the first element to the last one and for every element
* in this vector computes sum of all previous elements including the element.
* Therefore this method returns a new vector with the length of this vector.
*/
void
computePrefixSum
();
/**
* \brief Returns specific sums of elements of this vector.
*
* Does the same as computePrefixSum(), but computes only sums for elements
* with the index in range from \e begin to \e end. The other elements of this
* vector remain untouched - with the same value. Therefore this method returns
* a new vector with the length of this vector.
*
* \param begin Index of the element in this vector which to begin with.
* \param end Index of the element in this vector which to end with.
*/
void
computePrefixSum
(
const
IndexType
begin
,
const
IndexType
end
);
/**
* \brief Returns specific sums of elements of this vector.
*
* Goes in order from the first element to the last one and for every element
* in this vector computes sum of all previous elements excluding the element.
* Therefore returns a new vector with the length of this vector.
*/
void
computeExclusivePrefixSum
();
/**
* \brief Returns specific sums of elements of this vector.
*
* Does the same as computeExclusivePrefixSum(), but computes only sums for elements
* with the index in range from \e begin to \e end. The other elements of this
* vector remain untouched - with the same value. Therefore this method returns
* a new vector with the length of this vector.
*
* \param begin Index of the element in this vector which to begin with.
* \param end Index of the element in this vector which to end with.
*/
void
computeExclusivePrefixSum
(
const
IndexType
begin
,
const
IndexType
end
);
};
...
...
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