|
|
@@ -7,19 +7,17 @@ |
|
|
|
#include <vector>
|
|
|
|
#include "snf_saccades.hpp"
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
bool doesOverlap(unsigned int workingStart, unsigned int testStart, unsigned int workingFinish) {
|
|
|
|
return(
|
|
|
|
testStart >= workingStart &&
|
|
|
|
testStart <= workingFinish
|
|
|
|
);
|
|
|
|
}
|
|
|
|
vector<saccade> saccades_engine::recall() {
|
|
|
|
vector<saccade> recollection;
|
|
|
|
std::vector<saccade> saccades_engine::recall() {
|
|
|
|
std::vector<saccade> recollection;
|
|
|
|
int markersSize = markers.size();
|
|
|
|
if(0 < markersSize) {
|
|
|
|
set<saccade_marker>::iterator i;
|
|
|
|
std::set<saccade_marker>::iterator i;
|
|
|
|
recollection.reserve(markers.size());
|
|
|
|
bool isFirstPass = true;
|
|
|
|
unsigned int workingStart = 0;
|
|
|
@@ -100,7 +98,7 @@ void saccades_engine::recycleEngram(saccade s) { |
|
|
|
|
|
|
|
void saccades_engine::evoke(saccade s) {
|
|
|
|
bool stillGrowing = (capacity > engrams.size());
|
|
|
|
set<saccade_marker>::iterator i;
|
|
|
|
std::set<saccade_marker>::iterator i;
|
|
|
|
saccade_marker testMarker(s,0);
|
|
|
|
i = markers.find(testMarker);
|
|
|
|
bool isRemembered = (i != markers.end());
|
|
|
@@ -118,7 +116,7 @@ void saccades_engine::evoke(saccade s) { |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void saccades_engine::learn(vector<saccade>& experiences) {
|
|
|
|
void saccades_engine::learn(std::vector<saccade>& experiences) {
|
|
|
|
for(unsigned int i = 0; i < experiences.size(); i++) {
|
|
|
|
evoke(experiences[i]);
|
|
|
|
}
|