CASM
1.1.0
A Clusters Approach to Statistical Mechanics
ConfigDatabase.cc
Go to the documentation of this file.
1
#include "
casm/database/ConfigDatabase.hh
"
2
3
#include <boost/range/iterator_range.hpp>
4
5
#include "
casm/clex/Supercell.hh
"
6
7
namespace
CASM
{
8
namespace
DB {
9
11
Index
Database<Configuration>::scel_range_size
(
12
const
std::string &
scelname
)
const
{
13
return
boost::distance(scel_range(
scelname
));
14
}
15
19
typename
Database<Configuration>::iterator
Database<Configuration>::search
(
20
const
Configuration
&
config
)
const
{
21
auto
range = scel_range(
config
.supercell().name());
22
auto
res =
std::find
(range.begin(), range.end(),
config
);
23
if
(res == range.end()) {
24
return
end();
25
}
26
return
res;
27
}
28
29
}
// namespace DB
30
}
// namespace CASM
ConfigDatabase.hh
Supercell.hh
CASM::Configuration
Definition:
Configuration.hh:74
CASM::DB::Database
Definition:
enumerate_configurations.hh:19
CASM::scelname
std::string scelname(const Structure &prim, const Lattice &superlat)
Make supercell name name [deprecated].
Definition:
Supercell.cc:497
CASM::ConfigIO::config
ConfigIO::GenericConfigFormatter< jsonParser > config()
Definition:
ConfigIO.cc:777
CASM
Main CASM namespace.
Definition:
APICommand.hh:8
CASM::find
Iterator find(Iterator begin, Iterator end, const T &value, BinaryCompare q)
Equivalent to std::find(begin, end, value), but with custom comparison.
Definition:
algorithm.hh:16
CASM::Index
INDEX_TYPE Index
For long integer indexing:
Definition:
definitions.hh:39
src
casm
database
ConfigDatabase.cc
Generated on Tue Mar 23 2021 14:16:47 for CASM by
1.9.1