next up previous contents index
Next: File I/O Functions Up: Kernel Function Interface Previous: Learning and Pruning

Functions for the Manipulation of Patterns

 

krui_err krui_setPatternNo( int patter_no )
sets the current pattern; returns an error code if the pattern number is invalid. krui_err krui_deletePattern( void )
deletes the current pattern. krui_err krui_modifyPattern( void )
modifies the current pattern. Sets the pattern to the current activation of the units. krui_err krui_showPattern( int mode )
outputs a pattern on the activation or output values of the input/output units. The following modes are possible:

krui_showPattern(...)
draws pattern on the display. Generates an error code if the number of input and output units does not correspond with the previously loaded pattern. The constants of the various modes are defined in glob_typ.h. krui_err krui_newPattern( void )
creates a new pattern (an input/output pair). A pattern can be created by modifying the activation value of the input/output units. The function returns an error code if there is insufficient memory or the number of input/output units is incompatible with the pattern.

Note: krui_newPattern() switches pattern shuffling off. For shuffling the new patterns call:

  krui_newPattern(...)
  krui_shufflePatterns( TRUE )
void krui_deleteAllPatterns()
deletes all previously defined patterns in main memory. krui_err krui_shufflePatterns( bool on_or_off )
shuffles the order of the patterns if on_or_off is true. If on_or_off is false the original order can be restored. See also krui_setSeedNo(...). krui_err krui_shuffleSubPatterns(bool on_or_off)
shuffles sub pattern pairs by using pseudo random generator.
krui_shuffleSubPatterns(TRUE) switches shuffeling of sub patterns on,
krui_shuffleSubPatterns(FALSE) switches shuffeling of sub patterns off.
The default presetting is krui_shuffleSubPatterns (FALSE). int krui_getNoOfPatterns( void )
returns the actual number of patterns (0 if no patterns have been loaded). krui_err krui_allocNewPatternSet(int *set_no)
returns the number of the allocated pattern set. In case of an error the error code will be returned. krui_err krui_setCurrPatSet(int number)
chooses the number of the current pattern set. The number ranges from 0 to n-1. krui_err krui_deletePatSet(int number)
deletes all patterns of the pattern set with the given number. krui_err krui_GetPatInfo(pattern_set_info *set_info,
pattern_descriptor *pat_info)
gets all available information concerning the current pattern set and the current pattern. krui_err kruiDefShowSubPat(int *insize,int *outsize,int,
int *inpos,int *outpos)
defines the sub pattern that will be shown with the next call of krui_showPattern. krui_err krui_DefTrainSubPat(int *insize,int *outsize,int *instep,
int *outstep, int *max_n_pos)
defines how sub pattern should be generated during training. krui_DefTrainSubPat() has to be called before any training can take place. krui_err krui_AlignSubPat(int *inpos,int *outpos,int *no)
aligns the given sub pattern position to a valid position which fits the defined sub pattern training scheme (krui_DefTrainSubPat). krui_err krui_GetShapeOfSubPattern(int *insize,int *outsize,int *inpos,
int *outpos,int *n_pos)
gets the shape of the sub pattern by using the current set,current pattern and the current train scheme (defined with krui_DefTrainSubPat).

next up previous contents index
Next: File I/O Functions Up: Kernel Function Interface Previous: Learning and Pruning



Niels Mache
Wed May 17 11:23:58 MET DST 1995