API generic types
Simple typedefs
-
typedef uint32_t fort::myrmidon::TagID
The ID for a tag.
The identifier for a tag, which relates to Ant using Identification.
-
typedef uint32_t fort::myrmidon::AntID
The ID for an Ant.
Ant are uniquely identified within an Experiment with an AntID, which is at least
1
.0
is an invalid AntID.
-
typedef uint32_t fort::myrmidon::ZoneID
The ID for a Zone.
Zone are uniquely identified within an Experiment with a ZoneID, which is at least
1
.0
is an invalid/undefined Zone.
-
typedef uint32_t fort::myrmidon::SpaceID
The ID for a Space.
Space are uniquely identified within an Experiment with a SpaceID, which is at least
1
.0
is an invalid SpaceID.
-
typedef uint32_t fort::myrmidon::AntShapeTypeID
The ID for Ant virtual body parts.
Uniquely identifies an Ant shape type in an Experiment, from
1
.0
is an invalid value.
-
typedef uint32_t fort::myrmidon::MeasurementTypeID
The ID for Ant manual measurement types.
Uniquely identifies an Ant measurement type in an Experiment, from
1
.0
is an invalid value. The value1
always refers to the valid MeasurementTypeID HEAD_TAIL_MEASUREMENT_TYPE.
-
const MeasurementTypeID fort::myrmidon::HEAD_TAIL_MEASUREMENT_TYPE = 1
The head-tail Measurement type.
This Measurement type is always define for any Experiment and cannot be deleted. However, it can be renamed.
-
typedef std::vector<Eigen::Vector2d, Eigen::aligned_allocator<Eigen::Vector2d>> fort::myrmidon::Vector2dList
A List of 2D Vector.
-
enum class fort::myrmidon::ValueType
Enumerates possible types for Value.
Values:
-
enumerator BOOL
A boolean.
-
enumerator INT
An integer.
-
enumerator DOUBLE
a float
-
enumerator STRING
a std::string
-
enumerator BOOL
-
typedef std::variant<bool, int32_t, double, std::string, Time> fort::myrmidon::Value
Can hold any kind of value in object.
A c++ variant for the data that can be associated with certain fields, such as Ant timed Key/Values.
-
struct ValueUtils
Utilites function for Value.
Public Types
-
typedef std::vector<ValuedTimeRange> ValuedTimeRangeList
A List of ValuedTimeRange.
Public Static Functions
-
static const std::string &TypeName(ValueType type)
Gives the type name of a ValueType.
- Parameters:
type – the type to query for its name
- Throws:
std::invalid_argument – if type is unknown
- Returns:
the conventional name for type
-
static std::string TypeName(const Value &value)
Gives the type name of a Value.
- Parameters:
value – the the value to query for its type’s name
- Returns:
the conventional name for type’s value name
-
static ValuedTimeRangeList BuildRanges(const std::map<Time, Value> &values)
Gets the ValuedTimeRange from a list of Time’d Value.
- Parameters:
values – a list of timed values, such as returned by Ant::GetValues()
- Returns:
a ValuedTimeRangeList that would correspond to values
-
static ValuedTimeRangeList FindConflicts(const std::map<Time, Value> &values, const Value &defaultValue, const ValuedTimeRange &r)
Finds ValuedTimeRange that conflicts with a set of timed Value.
- Parameters:
values – a set of timed values as returned by Ant::GetValues()
defaultValue – the value that is considered a default value
r – the ValuedTimeRange to find any conflict with
- Returns:
the ValuedTimeRange that conflict with r
-
static Operations MergeRanges(const std::map<Time, Value> &values, const Value &defaultValue, const ValuedTimeRange &r)
Merges a ValuedTimeRange with a list of timed value.
This operation will kept the ValuedTimeRange defined by values which are not defaultValue intact. However r may have its boundaries modified, or be split in several ValuedTimeRange.
- Parameters:
values – the values to merge
defaultValue – the Value to be considered as an empty ValuedTimeRange
r – the ValuedTimeRange to merge
- Returns:
the Operations to actually perform the merge
-
static Operations OverwriteRanges(const std::map<Time, Value> &values, const ValuedTimeRange &r)
Overwrites a list of timed values to contain a ValuedTimeRange.
This operation will modifies values to ensure that the wanted ValuedTimeRange::Value is set over [ValuedTimeRange::Start;ValuedTimeRange::End[.
- Parameters:
values – the values to merge with r
r – the range to ensure existance
- Returns:
the Operations to actually perform the overwrite
-
struct Operations
Represents the list of operation to perform with Ant::SetValue() and Ant::DeleteValue to merge a range in an existing list.
Note
it is implied that this operation only should happend on a given common key.
Public Members
-
std::vector<std::tuple<Time, Value>> ToSet
Arguments to feed on Ant::SetValue().
-
std::vector<Time> ToDelete
Arguments to feed on Ant::DeleteValue()
-
std::vector<std::tuple<Time, Value>> ToSet
-
typedef std::vector<ValuedTimeRange> ValuedTimeRangeList
-
typedef std::vector<std::pair<AntShapeTypeID, std::shared_ptr<Capsule>>> fort::myrmidon::TypedCapsuleList
A list of Ant virtual shape part.
-
typedef std::pair<AntID, AntID> fort::myrmidon::InteractionID
Designates an interaction between two Ant.
Designates an interaction between two Ant, using their AntID. InteractionID are always constructed such as the first ID is strictly smaller than the second ID, so it ensures uniqueness of the InteractionID to reports interactions and collisions.
-
typedef Eigen::Matrix<uint32_t, Eigen::Dynamic, 2> fort::myrmidon::InteractionTypes
Designates list of interaction type for an interaction.
Designates an interaction type for an interaction. Each line represent a colliding capsules type. First column specifies the type for the first ant and the second column the second ant. Therefore (2,1) is not identical to (1,2).