src/classify/adaptive.cpp
void Classify::WriteAdaptedTemplates(FILE *File, ADAPT_TEMPLATES_STRUCT *Templates) {
  /* first write the high level adaptive template struct */
  fwrite(Templates, sizeof(ADAPT_TEMPLATES_STRUCT), 1, File);

  /* then write out the basic integer templates */
  WriteIntTemplates(File, Templates->Templates, unicharset);

  /* then write out the adaptive info for each class */
  for (unsigned i = 0; i < (Templates->Templates)->NumClasses; i++) {
    WriteAdaptedClass(File, Templates->Class[i], Templates->Templates->Class[i]->NumConfigs);
  }
}
/*---------------------------------------------------------------------------*/
/**
 * This routine saves Templates to File in a binary format.
 *
 * @param File    open text file to write Templates to
 * @param Templates set of adapted templates to write to File
 *
 * @note Globals: none
 */
This routine saves Templates to File in a binary format.
@param File    open text file to write Templates to
@param Templates set of adapted templates to write to File

@note Globals: none
This routine saves Templates to File in a binary format . @param File open text file to write Templates to @param Templates set of adapted templates to write to File @note Globals : none
void Classify::WriteAdaptedTemplates(FILE *File, ADAPT_TEMPLATES_STRUCT *Templates) {
  fwrite(Templates, sizeof(ADAPT_TEMPLATES_STRUCT), 1, File);
  WriteIntTemplates(File, Templates->Templates, unicharset);
  for (unsigned i = 0; i < (Templates->Templates)->NumClasses; i++) {
    WriteAdaptedClass(File, Templates->Class[i], Templates->Templates->Class[i]->NumConfigs);
  }
}
void Classify :: WriteAdaptedTemplates ( FILE * File , ADAPT_TEMPLATES_STRUCT * Templates ) { fwrite ( Templates , sizeof ( ADAPT_TEMPLATES_STRUCT ) , 1 , File ) ; WriteIntTemplates ( File , Templates -> Templates , unicharset ) ; for ( unsigned i = 0 ; i < ( Templates -> Templates ) -> NumClasses ; i ++ ) { WriteAdaptedClass ( File , Templates -> Class [ i ] , Templates -> Templates -> Class [ i ] -> NumConfigs ) ; } }
This routine saves Templates to File in a binary format.
This routine saves Templates to File in a binary format .
/* first write the high level adaptive template struct */ /* then write out the basic integer templates */ /* then write out the adaptive info for each class */