Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NP_TMcode
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Giacomo Mulas
NP_TMcode
Commits
9a1f2f0f
Commit
9a1f2f0f
authored
1 year ago
by
Giovanni La Mura
Browse files
Options
Downloads
Patches
Plain Diff
Fix matrix check flag name and hdf5_file pointer
parent
ceb70c31
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
src/libnptm/Configuration.cpp
+3
-2
3 additions, 2 deletions
src/libnptm/Configuration.cpp
with
3 additions
and
2 deletions
src/libnptm/Configuration.cpp
+
3
−
2
View file @
9a1f2f0f
...
@@ -556,7 +556,7 @@ ScattererConfiguration* ScattererConfiguration::from_hdf5(string file_name) {
...
@@ -556,7 +556,7 @@ ScattererConfiguration* ScattererConfiguration::from_hdf5(string file_name) {
status
=
hdf_file
->
read
(
"NXI"
,
"INT32_(1)"
,
&
nxi
);
status
=
hdf_file
->
read
(
"NXI"
,
"INT32_(1)"
,
&
nxi
);
iog
=
new
int
[
nsph
];
iog
=
new
int
[
nsph
];
string
str_type
=
"INT32_("
+
to_string
(
nsph
)
+
")"
;
string
str_type
=
"INT32_("
+
to_string
(
nsph
)
+
")"
;
status
=
hdf_file
.
read
(
"IOGVEC"
,
str_type
,
iog
);
status
=
hdf_file
->
read
(
"IOGVEC"
,
str_type
,
iog
);
int
configuration_count
=
0
;
int
configuration_count
=
0
;
for
(
int
ci
=
0
;
ci
<
nsph
;
ci
++
)
{
for
(
int
ci
=
0
;
ci
<
nsph
;
ci
++
)
{
if
(
iog
[
ci
]
<
ci
+
1
)
continue
;
if
(
iog
[
ci
]
<
ci
+
1
)
continue
;
...
@@ -564,6 +564,7 @@ ScattererConfiguration* ScattererConfiguration::from_hdf5(string file_name) {
...
@@ -564,6 +564,7 @@ ScattererConfiguration* ScattererConfiguration::from_hdf5(string file_name) {
}
}
nshl_vector
=
new
int
[
configuration_count
];
nshl_vector
=
new
int
[
configuration_count
];
ros_vector
=
new
double
[
configuration_count
];
ros_vector
=
new
double
[
configuration_count
];
// DA QUI
status
=
hdf_file
->
close
();
status
=
hdf_file
->
close
();
conf
=
new
ScattererConfiguration
(
conf
=
new
ScattererConfiguration
(
...
@@ -1079,7 +1080,7 @@ bool ScattererConfiguration::operator ==(ScattererConfiguration &other) {
...
@@ -1079,7 +1080,7 @@ bool ScattererConfiguration::operator ==(ScattererConfiguration &other) {
if
(
scale_vec
[
svi
]
!=
other
.
scale_vec
[
svi
])
return
false
;
if
(
scale_vec
[
svi
]
!=
other
.
scale_vec
[
svi
])
return
false
;
int
dj_index
=
0
;
int
dj_index
=
0
;
for
(
int
dj
=
0
;
dj
<
number_of_spheres
;
dj
++
)
{
for
(
int
dj
=
0
;
dj
<
number_of_spheres
;
dj
++
)
{
bool
check
matrixes
=
false
;
bool
check
_
matrixes
=
false
;
if
(
iog_vec
[
dj
]
>=
dj
+
1
)
{
if
(
iog_vec
[
dj
]
>=
dj
+
1
)
{
dj_index
=
iog_vec
[
dj
]
-
1
;
dj_index
=
iog_vec
[
dj
]
-
1
;
check_matrixes
=
true
;
check_matrixes
=
true
;
...
...
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