Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Show more breadcrumbs
Tobias Leibner
dune-common
Commits
1d1207e2
Commit
1d1207e2
authored
21 years ago
by
Robert Klöfkorn
Browse files
Options
Downloads
Patches
Plain Diff
Renamed Vector to SimpleVector because of conficts wtih class Vector
defined in vectorspace.hh. [[Imported from SVN: r206]]
parent
711efbcc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/array.hh
+6
-6
6 additions, 6 deletions
common/array.hh
with
6 additions
and
6 deletions
common/array.hh
+
6
−
6
View file @
1d1207e2
...
...
@@ -406,23 +406,23 @@ namespace Dune
//! a simple vector class derived from array
template
<
class
T
>
class
Vector
:
public
Array
<
T
>
{
class
Simple
Vector
:
public
Array
<
T
>
{
public:
//! make empty vector
Vector
()
{};
Simple
Vector
()
{};
//! make array with m components
Vector
(
int
m
)
:
Array
<
T
>::
Array
(
m
)
{}
Simple
Vector
(
int
m
)
:
Array
<
T
>::
Array
(
m
)
{}
//! assignment from scalar
Vector
<
T
>&
operator
=
(
const
T
t
)
Simple
Vector
<
T
>&
operator
=
(
const
T
t
)
{
for
(
int
i
=
0
;
i
<
n
;
++
i
)
p
[
i
]
=
t
;
return
*
this
;
}
//! scalar product of two vectors, no check for size !
T
ddot
(
const
Vector
<
T
>&
x
)
T
ddot
(
const
Simple
Vector
<
T
>&
x
)
{
T
sum
=
0
;
for
(
int
i
=
0
;
i
<
n
;
++
i
)
sum
+=
p
[
i
]
*
x
.
p
[
i
];
...
...
@@ -430,7 +430,7 @@ namespace Dune
}
// add scalar times other vector
void
daxpy
(
T
a
,
const
Vector
<
T
>&
x
)
void
daxpy
(
T
a
,
const
Simple
Vector
<
T
>&
x
)
{
for
(
int
i
=
0
;
i
<
n
;
++
i
)
p
[
i
]
+=
a
*
x
.
p
[
i
];
}
...
...
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