27 #include "../../../../core/entity/EntityRef.h"
31 const std::string PredictionEntity::SNAPSHOT_ATTRIBUTE(
"memorySnapshot");
32 const std::string PredictionEntity::SOURCE_SNAPSHOT_ATTRIBUTE(
"sourceMemorySnapshot");
33 const std::string PredictionEntity::PREDICTION_ATTRIBUTE(
"predictedMemorySnapshot");
34 const std::string PredictionEntity::PREDICTION_LIST_ATTRIBUTE(
"predictedMemorySnapshotList");
35 const std::string PredictionEntity::PREDICTION_METHOD_NAME_ATTRIBUTE(
"predictionMethodName");
36 const std::string PredictionEntity::TASK_COUNT_ATTRIBUTE(
"taskCount");
37 const std::string PredictionEntity::PREDICTION_SCORE_ATTRIBUTE(
"predictionScore");
45 const EntityRefBasePtr& sourceMemorySnapshotRef,
46 const EntityRefBasePtr& predictedMemorySnapshotRef,
47 const EntityRefBaseList& predictedMemorySnapshotRefList,
48 const std::string& predictionMethodName,
67 PredictionEntityBase(
source),
89 PredictionEntity::output(std::ostream& stream)
const
131 const EntityRefBasePtr& sourceMemorySnapshotRef,
134 getAttribute(PredictionEntity::SOURCE_SNAPSHOT_ATTRIBUTE)
146 const EntityRefBasePtr& predictedMemorySnapshotRef,
156 EntityAttributeBasePtr attribute =
157 getAttribute(PredictionEntity::PREDICTION_LIST_ATTRIBUTE);
158 EntityRefBaseList entityList;
159 for (
int i = 0; i < attribute->size(); i++)
162 armarx::VariantPtr::dynamicCast(attribute->getValueAt(i));
163 entityList.push_back(attributeValue->get<
EntityRef>());
170 const EntityRefBaseList& predictedMemorySnapshotRefList,
173 EntityAttributeBasePtr attribute =
174 getAttribute(PredictionEntity::PREDICTION_LIST_ATTRIBUTE);
176 for (
const EntityRefBasePtr& entityRef : predictedMemorySnapshotRefList)
185 return getAttribute(PredictionEntity::PREDICTION_METHOD_NAME_ATTRIBUTE)
194 getAttribute(PredictionEntity::PREDICTION_METHOD_NAME_ATTRIBUTE)
214 return getAttributeValue(PredictionEntity::PREDICTION_SCORE_ATTRIBUTE)->getFloat();
220 getAttribute(PredictionEntity::PREDICTION_SCORE_ATTRIBUTE)