Skip to content
Snippets Groups Projects
Commit 81e181ae authored by mkirsz's avatar mkirsz
Browse files

new add method

parent 00fe58b5
No related branches found
No related tags found
1 merge request!12Develop
Pipeline #48520 failed
...@@ -15,25 +15,28 @@ ...@@ -15,25 +15,28 @@
* *
*/ */
struct StDescriptorsDB { struct StDescriptorsDB {
std::vector<StDescriptors> st_descs; std::vector<StDescriptors> st_descs;
StDescriptorsDB() {}; StDescriptorsDB() {};
/** This constructor fully initialise this object /** This constructor fully initialise this object
* *
* Requires: * Requires:
* - StructureDB st to have all nearest neighbours calculated * - StructureDB st to have all nearest neighbours calculated
* - Config to contain keys: \ref FORCE, \ref STRESS * - Config to contain keys: \ref FORCE, \ref STRESS
* and \ref INTERNAL_KEY \ref DSIZE * and \ref INTERNAL_KEY \ref DSIZE
*/ */
StDescriptorsDB(const StructureDB &stdb, Config &config); StDescriptorsDB(const StructureDB &stdb, Config &config);
/** Return reference to the n-th StDescriptors /** Return reference to the n-th StDescriptors
* stored by this object * stored by this object
*/ */
StDescriptors& operator()(const size_t n); StDescriptors& operator()(const size_t n);
/** Return number of StDescriptors stored */ /** Return number of StDescriptors stored */
size_t size() const; size_t size() const;
/** Add StDescriptors to DB */
void add(const StDescriptors &st_d);
}; };
#endif #endif
...@@ -15,3 +15,6 @@ StDescriptors &StDescriptorsDB::operator()(const size_t s) { ...@@ -15,3 +15,6 @@ StDescriptors &StDescriptorsDB::operator()(const size_t s) {
size_t StDescriptorsDB::size() const { size_t StDescriptorsDB::size() const {
return st_descs.size(); return st_descs.size();
} }
void StDescriptorsDB::add(const StDescriptors &st_d) {
st_descs.push_back(st_d);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment