|
@@ -65,7 +65,7 @@ struct rpn_ifs_s
|
65
|
65
|
/**@brief Stores the original chance of choosing corresponding IF */
|
66
|
66
|
unsigned int *weight;
|
67
|
67
|
/** @brief Stores an array of 255 pointers on IF allowing fast
|
68
|
|
- * random choice */
|
|
68
|
+ * random choice. Last ptr can be NULL*/
|
69
|
69
|
rpn_if_t *if_proba[255];
|
70
|
70
|
|
71
|
71
|
/**@brief Stores the RPN expressions pointer of the IF contained in
|
|
@@ -107,6 +107,14 @@ size_t rpn_ifs_add_if(rpn_ifs_t *rifs, unsigned int weight);
|
107
|
107
|
*/
|
108
|
108
|
int rpn_ifs_del_if(rpn_ifs_t *rifs, size_t if_idx);
|
109
|
109
|
|
|
110
|
+/**@brief Call IFS n times
|
|
111
|
+ * @note Make n random choices and call corresponding IF
|
|
112
|
+ * @param rifs The iterated function system
|
|
113
|
+ * @param n consecutive IFS calls
|
|
114
|
+ * @return 1 if error else 0
|
|
115
|
+ */
|
|
116
|
+int rpn_ifs_run(rpn_ifs_t *rifs, size_t n);
|
|
117
|
+
|
110
|
118
|
/**@brief Updates the @ref rpn_ifs_s.if_proba array using
|
111
|
119
|
* @ref rpn_ifs_s.if_proba values
|
112
|
120
|
* @param rifs The iterated function system
|