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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
c313cbbd
Commit
c313cbbd
authored
13 years ago
by
Amaury Johnen
Browse files
Options
Downloads
Patches
Plain Diff
fix bug
parent
fed83644
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Numeric/fullMatrix.h
+2
-3
2 additions, 3 deletions
Numeric/fullMatrix.h
with
2 additions
and
3 deletions
Numeric/fullMatrix.h
+
2
−
3
View file @
c313cbbd
...
@@ -80,7 +80,6 @@ class fullVector
...
@@ -80,7 +80,6 @@ class fullVector
_r
=
r
;
_r
=
r
;
_data
=
original
.
_data
+
r_start
;
_data
=
original
.
_data
+
r_start
;
}
}
#ifndef SWIG // NO FRIEND CLASS SUPPORT FOR SWIG !! FIX IT
void
setAsProxy
(
const
fullMatrix
<
scalar
>
&
original
,
int
c
)
void
setAsProxy
(
const
fullMatrix
<
scalar
>
&
original
,
int
c
)
{
{
if
(
_own_data
&&
_data
)
delete
[]
_data
;
if
(
_own_data
&&
_data
)
delete
[]
_data
;
...
@@ -88,7 +87,6 @@ class fullVector
...
@@ -88,7 +87,6 @@ class fullVector
_r
=
original
.
_r
;
_r
=
original
.
_r
;
_data
=
original
.
_data
+
c
*
_r
;
_data
=
original
.
_data
+
c
*
_r
;
}
}
#endif // SWIG
inline
void
scale
(
const
scalar
s
)
inline
void
scale
(
const
scalar
s
)
{
{
if
(
s
==
0.
)
if
(
s
==
0.
)
...
@@ -152,6 +150,7 @@ class fullMatrix
...
@@ -152,6 +150,7 @@ class fullMatrix
bool
_own_data
;
// should data be freed on delete ?
bool
_own_data
;
// should data be freed on delete ?
int
_r
,
_c
;
// size of the matrix
int
_r
,
_c
;
// size of the matrix
scalar
*
_data
;
// pointer on the first element
scalar
*
_data
;
// pointer on the first element
friend
class
fullVector
<
scalar
>
;
public:
public:
// constructor and destructor
// constructor and destructor
...
@@ -219,7 +218,7 @@ class fullMatrix
...
@@ -219,7 +218,7 @@ class fullMatrix
scalar
n
=
0.
;
scalar
n
=
0.
;
for
(
int
i
=
0
;
i
<
_r
;
++
i
)
for
(
int
i
=
0
;
i
<
_r
;
++
i
)
for
(
int
j
=
0
;
j
<
_c
;
++
j
)
for
(
int
j
=
0
;
j
<
_c
;
++
j
)
n
+=
(
*
this
)(
i
,
j
)
*
(
*
this
)(
i
,
j
);
n
+=
(
*
this
)(
i
,
j
)
*
(
*
this
)(
i
,
j
);
return
sqrt
(
n
);
return
sqrt
(
n
);
}
}
bool
resize
(
int
r
,
int
c
,
bool
resetValue
=
true
)
// data will be owned (same as constructor)
bool
resize
(
int
r
,
int
c
,
bool
resetValue
=
true
)
// data will be owned (same as constructor)
...
...
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