Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MLIP
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tadah
MLIP
Commits
81a3bb2b
Commit
81a3bb2b
authored
3 months ago
by
mkirsz
Browse files
Options
Downloads
Patches
Plain Diff
Added range based loops
parent
9c11cfee
No related branches found
No related tags found
1 merge request
!12
Develop
Pipeline
#48522
failed
3 months ago
Stage: build.debug
Stage: run.unit.tests
Stage: build_release
Stage: trigger
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/tadah/mlip/st_descriptors_db.h
+6
-0
6 additions, 0 deletions
include/tadah/mlip/st_descriptors_db.h
src/st_descriptors_db.cpp
+15
-0
15 additions, 0 deletions
src/st_descriptors_db.cpp
with
21 additions
and
0 deletions
include/tadah/mlip/st_descriptors_db.h
+
6
−
0
View file @
81a3bb2b
...
@@ -38,5 +38,11 @@ struct StDescriptorsDB {
...
@@ -38,5 +38,11 @@ struct StDescriptorsDB {
/** Add StDescriptors to DB */
/** Add StDescriptors to DB */
void
add
(
const
StDescriptors
&
st_d
);
void
add
(
const
StDescriptors
&
st_d
);
// Methods to enable range-based for loop
std
::
vector
<
StDescriptors
>::
iterator
begin
();
std
::
vector
<
StDescriptors
>::
iterator
end
();
std
::
vector
<
StDescriptors
>::
const_iterator
begin
()
const
;
std
::
vector
<
StDescriptors
>::
const_iterator
end
()
const
;
};
};
#endif
#endif
This diff is collapsed.
Click to expand it.
src/st_descriptors_db.cpp
+
15
−
0
View file @
81a3bb2b
...
@@ -18,3 +18,18 @@ size_t StDescriptorsDB::size() const {
...
@@ -18,3 +18,18 @@ size_t StDescriptorsDB::size() const {
void
StDescriptorsDB
::
add
(
const
StDescriptors
&
st_d
)
{
void
StDescriptorsDB
::
add
(
const
StDescriptors
&
st_d
)
{
st_descs
.
push_back
(
st_d
);
st_descs
.
push_back
(
st_d
);
}
}
std
::
vector
<
StDescriptors
>::
iterator
StDescriptorsDB
::
begin
()
{
return
st_descs
.
begin
();
}
std
::
vector
<
StDescriptors
>::
iterator
StDescriptorsDB
::
end
()
{
return
st_descs
.
end
();
}
std
::
vector
<
StDescriptors
>::
const_iterator
StDescriptorsDB
::
begin
()
const
{
return
st_descs
.
cbegin
();
}
std
::
vector
<
StDescriptors
>::
const_iterator
StDescriptorsDB
::
end
()
const
{
return
st_descs
.
cend
();
}
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