| summaryrefslogtreecommitdiff |
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-02-08 15:21:19 +0100 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-02-08 15:21:19 +0100 |
| commit | 9ca43c73ba29d6b42cd771f1567074418c883c3e (patch) | |
| tree | 1e3560f218c80fe1e343a647c1d0f177d2d16b0f /src/knowledge | |
| parent | ee26b8ff850add4f83b912635a71dbde06f268d1 (diff) | |
Changes knowledge structure, defines protocol.
Diffstat (limited to 'src/knowledge')
| -rw-r--r-- | src/knowledge/knowledge.c | 12 | ||||
| -rw-r--r-- | src/knowledge/knowledge.h | 5 |
2 files changed, 14 insertions, 3 deletions
diff --git a/src/knowledge/knowledge.c b/src/knowledge/knowledge.c index c9bfc2a..5ce6917 100644 --- a/src/knowledge/knowledge.c +++ b/src/knowledge/knowledge.c @@ -56,3 +56,15 @@ void ZoO_knowledge_unlock_access { pthread_mutex_unlock(&(k->mutex)); } + +void ZoO_knowledge_get_word +( + const struct ZoO_knowledge k [const static 1], + const ZoO_index word_ref, + const ZoO_char * word [const restrict static 1], + ZoO_index word_length [const restrict static 1] +) +{ + *word = k->words[word_ref].word; + *word_length = k->words[word_ref].word_length; +} diff --git a/src/knowledge/knowledge.h b/src/knowledge/knowledge.h index 7f1bb42..e97d84e 100644 --- a/src/knowledge/knowledge.h +++ b/src/knowledge/knowledge.h @@ -61,13 +61,12 @@ int ZoO_knowledge_learn_markov_sequence const struct ZoO_pipe io [const restrict static 1] ); -int ZoO_knowledge_get_word +void ZoO_knowledge_get_word ( const struct ZoO_knowledge k [const static 1], const ZoO_index word_ref, const ZoO_char * word [const restrict static 1], - ZoO_index word_size [const restrict static 1], - const struct ZoO_pipe io [const restrict static 1] + ZoO_index word_length [const restrict static 1] ); /* |


