Wildmeshing Toolkit
Loading...
Searching...
No Matches
MaxFunctionInvariant.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <optional>
7#include "Invariant.hpp"
8
9namespace wmtk {
10
11namespace function {
12class PerSimplexFunction;
13}
14
15namespace invariants {
16
18{
19public:
21 const PrimitiveType type,
22 const std::shared_ptr<function::PerSimplexFunction>& func,
23 const std::optional<TypedAttributeHandle<Rational>>& coordinate = {});
24
25 bool before(const simplex::Simplex& simplex) const override;
26
27 bool after(
28 const std::vector<Tuple>& top_dimension_tuples_before,
29 const std::vector<Tuple>& top_dimension_tuples_after) const override;
30
31private:
32 std::shared_ptr<function::PerSimplexFunction> m_func;
34 const std::optional<TypedAttributeHandle<Rational>> m_coordinate_handle;
35 mutable bool was_v0_rounded;
36};
37} // namespace invariants
38} // namespace wmtk
Handle that represents attributes for some mesh.
bool after(const std::vector< Tuple > &top_dimension_tuples_before, const std::vector< Tuple > &top_dimension_tuples_after) const override
std::shared_ptr< function::PerSimplexFunction > m_func
const std::optional< TypedAttributeHandle< Rational > > m_coordinate_handle
bool before(const simplex::Simplex &simplex) const override