From ee26b8ff850add4f83b912635a71dbde06f268d1 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Fri, 3 Feb 2017 22:20:35 +0100 Subject: Continuing Implementation... --- src/knowledge/knowledge.h | 68 ++++++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 31 deletions(-) (limited to 'src/knowledge/knowledge.h') diff --git a/src/knowledge/knowledge.h b/src/knowledge/knowledge.h index e868943..7f1bb42 100644 --- a/src/knowledge/knowledge.h +++ b/src/knowledge/knowledge.h @@ -61,24 +61,6 @@ int ZoO_knowledge_learn_markov_sequence const struct ZoO_pipe io [const restrict static 1] ); -int ZoO_knowledge_get_swt_sequences_ref -( - const struct ZoO_knowledge k [const static 1], - const ZoO_index initial_word, - const ZoO_index * restrict following_sequences_ref [const restrict static 1], - const ZoO_index * restrict following_sequences_weights [const restrict static 1], - ZoO_index following_sequences_weights_sum [const static 1], - const struct ZoO_pipe io [const restrict static 1] -); - -int ZoO_knowledge_get_sequence -( - const struct ZoO_knowledge k [const static 1], - const ZoO_index sequences_ref, - const ZoO_index * restrict sequence [const restrict static 1], - const struct ZoO_pipe io [const restrict static 1] -); - int ZoO_knowledge_get_word ( const struct ZoO_knowledge k [const static 1], @@ -106,26 +88,50 @@ int ZoO_knowledge_find_word_id ZoO_index result [const restrict static 1] ); -int ZoO_knowledge_find_tws_targets +int ZoO_knowledge_find_sequence ( const struct ZoO_knowledge k [const static 1], - const ZoO_index sequence [const restrict], - const ZoO_index markov_order, - const ZoO_index * restrict targets [const restrict static 1], - const ZoO_index * restrict targets_weights [const restrict static 1], - ZoO_index targets_weights_sum [const restrict static 1], - const struct ZoO_pipe io [const restrict static 1] + const ZoO_index sequence [const restrict static 1], + const ZoO_index markov_order, /* Pre: (> 1) */ + ZoO_index sequence_id [const restrict static 1] +); + +int ZoO_knowledge_find_markov_sequence +( + const ZoO_index sequence_id, + const struct ZoO_knowledge_sequence_collection sc [const restrict static 1], + ZoO_index result [const restrict static 1] ); -int ZoO_knowledge_find_swt_targets +int ZoO_knowledge_find_sequence_target +( + const ZoO_index target_id, + const struct ZoO_knowledge_sequence_data sd [const restrict static 1], + ZoO_index result [const restrict static 1] +); + +int ZoO_knowledge_random_tws_target ( const struct ZoO_knowledge k [const static 1], - const ZoO_index sequence [const restrict], - const size_t sequence_length, + ZoO_index target [const restrict static 1], + const ZoO_index word_id, + const ZoO_index sequence_id +); + +int ZoO_knowledge_random_swt_target +( + const struct ZoO_knowledge k [const static 1], + const ZoO_index sequence_id, + const ZoO_index word_id, + ZoO_index target [const restrict static 1] +); + +int ZoO_knowledge_copy_random_swt_sequence +( + const struct ZoO_knowledge k [const static 1], + ZoO_index sequence [const restrict static 1], + const ZoO_index word_id, const ZoO_index markov_order, - const ZoO_index * restrict targets [const restrict static 1], - const ZoO_index * restrict targets_weights [const restrict static 1], - ZoO_index targets_weights_sum [const restrict static 1], const struct ZoO_pipe io [const restrict static 1] ); -- cgit v1.2.3-70-g09d2