#include <algorithm>
#include "symmetri/types.h"
Go to the source code of this file.
|
template<typename T > |
bool | symmetri::MarkingEquality (const std::vector< T > &m1, const std::vector< T > &m2) |
| Checks if the markings are exactly the same. Note that this uses a different type for Marking compared to the Marking type used to construct a net (an unordered map of strings). In this format the amount of tokens in a particular place is represented by how often that place occurs in the vector. For example: {"A","A","B"} is a marking with two tokens in place "A" and one token in place "B". This format does not have the overhead of mentioning all empty places.
|
|
template<typename T > |
bool | symmetri::MarkingReached (const std::vector< T > &marking, const std::vector< T > &goal_marking) |
| Checks if marking is at least a subset of goal_marking. Note that this uses a different type for Marking compared to the Marking type used to construct a net (an unordered map of strings). In this format the amount of tokens in a particular place is represented by how often that place occurs in the vector. For example: {"A","A","B"} is a marking with two tokens in place "A" and one token in place "B". This format does not have the overhead of mentioning all empty places.
|
|
bool | symmetri::stateNetEquality (const Net &net1, const Net &net2) |
| Checks if two petri-nets have equal amount of arcs between places and transitions of the same name.
|
|
size_t | symmetri::calculateTrace (const Eventlog &log) noexcept |
| Calculates a hash given an event log. This hash is only influenced by the order of the completions of transitions, the tokens the transitions return and the case_id of the net the transition is fired from.
|
|
◆ calculateTrace()
size_t symmetri::calculateTrace |
( |
const Eventlog & | log | ) |
|
|
noexcept |
Calculates a hash given an event log. This hash is only influenced by the order of the completions of transitions, the tokens the transitions return and the case_id of the net the transition is fired from.
- Parameters
-
log | An eventlog, can both be from a terminated or a still active net. |
- Returns
- size_t The hashed result.
◆ MarkingEquality()
template<typename T >
bool symmetri::MarkingEquality |
( |
const std::vector< T > & | m1, |
|
|
const std::vector< T > & | m2 ) |
Checks if the markings are exactly the same. Note that this uses a different type for Marking compared to the Marking type used to construct a net (an unordered map of strings). In this format the amount of tokens in a particular place is represented by how often that place occurs in the vector. For example: {"A","A","B"} is a marking with two tokens in place "A" and one token in place "B". This format does not have the overhead of mentioning all empty places.
- Template Parameters
-
- Parameters
-
- Returns
- true
-
false
◆ MarkingReached()
template<typename T >
bool symmetri::MarkingReached |
( |
const std::vector< T > & | marking, |
|
|
const std::vector< T > & | goal_marking ) |
Checks if marking is at least a subset of goal_marking. Note that this uses a different type for Marking compared to the Marking type used to construct a net (an unordered map of strings). In this format the amount of tokens in a particular place is represented by how often that place occurs in the vector. For example: {"A","A","B"} is a marking with two tokens in place "A" and one token in place "B". This format does not have the overhead of mentioning all empty places.
- Template Parameters
-
- Parameters
-
- Returns
- true
-
false
◆ stateNetEquality()
bool symmetri::stateNetEquality |
( |
const Net & | net1, |
|
|
const Net & | net2 ) |
Checks if two petri-nets have equal amount of arcs between places and transitions of the same name.
- Parameters
-
- Returns
- true
-
false