From 492b9cd1ecc234ea8f3080b305103702d2ca772b Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Sat, 7 Jan 2017 23:30:35 +0100 Subject: Starting to rewrite the knowledge stuff. --- src/core/sequence.h | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'src/core/sequence.h') diff --git a/src/core/sequence.h b/src/core/sequence.h index fb4b628..e609b4d 100644 --- a/src/core/sequence.h +++ b/src/core/sequence.h @@ -2,7 +2,7 @@ #define _ZoO_CORE_SEQUENCE_H_ #include "../core/index_types.h" -#include "../core/knownledge_types.h" +#include "../core/knowledge_types.h" #include "sequence_types.h" @@ -27,7 +27,7 @@ * (knows {k} {initial_word}) * (initialized {k}) */ -int ZoO_create_sequence_from +int ZoO_sequence_create_from ( const ZoO_index initial_word, ZoO_index credits [const restrict], @@ -37,4 +37,23 @@ int ZoO_create_sequence_from size_t sequence_size [const restrict static 1] ); +/* + * Compares two sequences. + * ZoO_END_OF_SEQUENCE marks the ending of a sequence, regardless of indicated + * sequence length, meaning that [10][ZoO_END_OF_SEQUENCE][9] and + * [10][ZoO_END_OF_SEQUENCE][8] are considered equal. Sequences do not have to + * contain ZoO_END_OF_SEQUENCE. + * Return: + * 1 iff {sequence_a} should be considered being more than {sequence_b} + * 0 iff {sequence_a} should be considered being equal to {sequence_b} + * -1 iff {sequence_a} should be considered being less than {sequence_b} + */ +int ZoO_sequence_cmp +( + const ZoO_index sequence_a [const], + const ZoO_index sequence_a_length, + const ZoO_index sequence_b [const], + const ZoO_index sequence_b_length +); + #endif -- cgit v1.2.3-70-g09d2