Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F386616
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Size
3 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/include/rosa/agent/State.hpp b/include/rosa/agent/State.hpp
index 37236e2..a3cd936 100644
--- a/include/rosa/agent/State.hpp
+++ b/include/rosa/agent/State.hpp
@@ -1,42 +1,64 @@
//===-- rosa/agent/State.hpp ----------------------------*- C++ -*-===//
//
// The RoSA Framework
//
//===----------------------------------------------------------------------===//
///
/// \file rosa/agent/State.hpp
///
/// \author Maximilian Götzinger (maximilian.goetzinger@tuwien.ac.at)
///
/// \date 2019
///
/// \brief Definition of *state* *functionality*.
///
//===----------------------------------------------------------------------===//
#ifndef ROSA_AGENT_STATE_HPP
#define ROSA_AGENT_STATE_HPP
#include "rosa/agent/Functionality.h"
#include "rosa/agent/History.hpp"
namespace rosa {
namespace agent {
/// \tparam D type of data
template <typename D> class State : public Functionality {
private:
- History history;
-
+ DynamicHistory<D, HistoryPolicy::FIFO> SampleHistory; //Make History dynamic
+ DynamicHistory<D, HistoryPolicy::SRWF> DAB;
+ DynamicHistory<XXX, HistoryPolicy::LIFO> DABHistory; //Implement LIFO
+
public:
- State(D Intercept, D Coefficient) noexcept
- : history<D, R>(history) {}
+ State(unsigned int sampleHistorySize, unsigned int DABSize,
+ unsigned int DABHistorySize) noexcept :
+ SampleHistory(sampleHistorySize),
+ DAB(DABSize),
+ DABHistory(DABHistorySize) {}
+
+ ~State(void) = default;
+
+ bool insertSample(D Sample) {
+
+ bool workedForAll;
+
+ workedForAll = SampleHistory.addEntry(Sample);
+
+ //check if full/empty
+
+ workedForAll &= DAB.addEntry(Sample)
+
+
+
+
+ }
};
} // End namespace agent
} // End namespace rosa
#endif // ROSA_AGENT_STATE_HPP
\ No newline at end of file
diff --git a/include/rosa/agent/StateDetector.hpp b/include/rosa/agent/StateDetector.hpp
index 7e8bdcf..14f3d87 100644
--- a/include/rosa/agent/StateDetector.hpp
+++ b/include/rosa/agent/StateDetector.hpp
@@ -1,41 +1,45 @@
//===-- rosa/agent/StateDetector.hpp ----------------------------*- C++ -*-===//
//
// The RoSA Framework
//
//===----------------------------------------------------------------------===//
///
/// \file rosa/agent/StateDetector.hpp
///
/// \author Maximilian Götzinger (maximilian.goetzinger@tuwien.ac.at)
///
/// \date 2019
///
/// \brief Definition of *state detection* *functionality*.
///
//===----------------------------------------------------------------------===//
#ifndef ROSA_AGENT_STATEDETECTOR_HPP
#define ROSA_AGENT_STATEDETECTOR_HPP
#include "rosa/agent/Functionality.h"
namespace rosa {
namespace agent {
-/// A special \c rosa::Agent with its own state.
-class MyAgent {
+/// A special \c rosa::Agent with its own state. XXX
+template <typename D> class StateDetector : public Functionality {
private:
unsigned int discreteAveragePartitionCounter;
-
+ vector<States> DetectedStates;
+ bool stateIsValid;
+ bool stateIsValidAfterReentrance;
+ PartialFunction<D, D> ConfidenceSimilarToSample;
+
public:
-
+};
} // End namespace agent
} // End namespace rosa
#endif // ROSA_AGENT_STATEDETECTOR_HPP
\ No newline at end of file
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Jul 3, 10:50 PM (2 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
157405
Default Alt Text
(3 KB)
Attached To
Mode
R20 SoC_Rosa_repo
Attached
Detach File
Event Timeline
Log In to Comment