20 :
Group(*(getProductOfCyclicGroups(factorGroups))) {}
26 std::vector<Group_const_sptr> factorGroups =
getFactorGroups(operations);
33std::vector<Group_const_sptr>
35 std::vector<Group_const_sptr> groups;
36 groups.reserve(symmetryOperations.size());
38 symmetryOperations.cbegin(), symmetryOperations.cend(), std::back_inserter(groups),
39 [](
const auto &symmetryOperation) { return GroupFactory::create<CyclicGroup>(symmetryOperation.identifier()); });
46 Group_const_sptr productGroup = std::make_shared<const Group>(*(factorGroups.front()));
48 for (
size_t i = 1; i < factorGroups.size(); ++i) {
49 productGroup = productGroup * factorGroups[i];
The class Group represents a set of symmetry operations (or symmetry group).
Group_const_sptr getGeneratedGroup(const std::string &generators) const
Generates symmetry operations from the string, creates a CyclicGroup from each operation and multipli...
ProductOfCyclicGroups(const std::string &generators)
String constructor with semicolon-separated symmetry operations.
Group_const_sptr getProductOfCyclicGroups(const std::vector< Group_const_sptr > &factorGroups) const
Multiplies all supplied groups and returns the result.
std::vector< Group_const_sptr > getFactorGroups(const std::vector< SymmetryOperation > &symmetryOperations) const
Returns a vector of cyclic groups for the given vector of symmetry operations.
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
std::shared_ptr< const Group > Group_const_sptr