Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
e0c8a2fe
Commit
e0c8a2fe
authored
15 years ago
by
Jonathan Lambrechts
Browse files
Options
Downloads
Patches
Plain Diff
add row proxy on fullMatrix
parent
1a5bd037
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Numeric/fullMatrix.h
+11
-2
11 additions, 2 deletions
Numeric/fullMatrix.h
with
11 additions
and
2 deletions
Numeric/fullMatrix.h
+
11
−
2
View file @
e0c8a2fe
...
...
@@ -75,21 +75,30 @@ template <class scalar>
class
fullMatrix
{
private:
bool
_own_data
;
// should data be freed on delete ?
int
_r
,
_c
;
scalar
*
_data
;
public:
fullMatrix
(
fullMatrix
<
scalar
>
&
original
,
int
r_start
,
int
r
){
_r
=
r
;
_c
=
original
.
_c
;
_own_data
=
false
;
_data
=
original
.
_data
+
r_start
*
_c
;
}
fullMatrix
(
int
r
,
int
c
)
:
_r
(
r
),
_c
(
c
)
{
_data
=
new
scalar
[
_r
*
_c
];
_own_data
=
true
;
scale
(
0.
);
}
fullMatrix
(
const
fullMatrix
<
scalar
>
&
other
)
:
_r
(
other
.
_r
),
_c
(
other
.
_c
)
{
_data
=
new
scalar
[
_r
*
_c
];
_own_data
=
true
;
for
(
int
i
=
0
;
i
<
_r
*
_c
;
++
i
)
_data
[
i
]
=
other
.
_data
[
i
];
}
fullMatrix
()
:
_r
(
0
),
_c
(
0
),
_data
(
0
)
{}
~
fullMatrix
()
{
if
(
_data
)
delete
[]
_data
;
}
fullMatrix
()
:
_own_data
(
false
),
_r
(
0
),
_c
(
0
),
_data
(
0
)
{}
~
fullMatrix
()
{
if
(
_data
&&
_own_data
)
delete
[]
_data
;
}
inline
int
size1
()
const
{
return
_r
;
}
inline
int
size2
()
const
{
return
_c
;
}
fullMatrix
<
scalar
>
&
operator
=
(
const
fullMatrix
<
scalar
>
&
other
)
...
...
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