Wildmeshing Toolkit
Loading...
Searching...
No Matches
InvariantCollection.hpp
Go to the documentation of this file.
1#pragma once
2#include <map>
3#include <memory>
4#include <vector>
5#include "Invariant.hpp"
6
7
8namespace wmtk {
9namespace simplex {
10class Simplex;
11}
12
13namespace invariants {
14
16{
17public:
18 InvariantCollection(const Mesh& m);
24 bool before(const simplex::Simplex& t) const override;
25 bool after(
26 const std::vector<Tuple>& top_dimension_tuples_before,
27 const std::vector<Tuple>& top_dimension_tuples_after) const override;
28
29
31 const std::vector<simplex::Simplex>& simplices_before,
32 const std::vector<simplex::Simplex>& simplices_after) const override;
33
34 // pass by value so this can be internally moved
35 void add(std::shared_ptr<Invariant> invariant);
36
37 const std::shared_ptr<Invariant>& get(int64_t index) const;
38 int64_t size() const;
39 bool empty() const;
40 const std::vector<std::shared_ptr<Invariant>>& invariants() const;
41
42 [[noreturn]] std::map<Mesh const*, std::vector<std::shared_ptr<Invariant>>>
44
45private:
46 std::vector<std::shared_ptr<Invariant>> m_invariants;
47};
48
49} // namespace invariants
50
51class Mesh;
52} // namespace wmtk
bool directly_modified_after(const std::vector< simplex::Simplex > &simplices_before, const std::vector< simplex::Simplex > &simplices_after) const override
void add(std::shared_ptr< Invariant > invariant)
InvariantCollection(InvariantCollection &&)
std::map< Mesh const *, std::vector< std::shared_ptr< Invariant > > > get_map_mesh_to_invariants()
bool before(const simplex::Simplex &t) const override
bool after(const std::vector< Tuple > &top_dimension_tuples_before, const std::vector< Tuple > &top_dimension_tuples_after) const override
std::vector< std::shared_ptr< Invariant > > m_invariants
const std::shared_ptr< Invariant > & get(int64_t index) const
const std::vector< std::shared_ptr< Invariant > > & invariants() const
InvariantCollection & operator=(const InvariantCollection &)
InvariantCollection(const InvariantCollection &)