From bb7bb1f0b82011b891b2da18b5e8fc7263a5de03 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Tue, 3 Jul 2018 14:46:41 +0200 Subject: [PATCH] Remove old comments for exceptions Exceptions are no longer used. Remove also some history comments and fix several comments. Signed-off-by: Stefan Weil --- src/classify/adaptive.cpp | 30 --------- src/classify/adaptmatch.cpp | 72 +-------------------- src/classify/cluster.cpp | 111 +------------------------------- src/classify/clusttool.cpp | 12 +--- src/classify/cutoffs.cpp | 2 - src/classify/float2int.cpp | 9 --- src/classify/fpoint.cpp | 4 +- src/classify/intmatcher.cpp | 15 ----- src/classify/intproto.cpp | 61 ------------------ src/classify/kdtree.cpp | 17 ----- src/classify/mf.cpp | 2 - src/classify/mfdefs.cpp | 4 +- src/classify/mfoutline.cpp | 22 ------- src/classify/mfx.cpp | 10 --- src/classify/normmatch.cpp | 6 -- src/classify/ocrfeatures.cpp | 10 +-- src/classify/outfeat.cpp | 12 ---- src/classify/picofeat.cpp | 12 ---- src/cutil/bitvec.cpp | 6 -- src/training/cntraining.cpp | 4 -- src/training/commontraining.cpp | 20 ------ src/training/mergenf.cpp | 9 --- src/training/mftraining.cpp | 5 +- 23 files changed, 8 insertions(+), 447 deletions(-) diff --git a/src/classify/adaptive.cpp b/src/classify/adaptive.cpp index 2ee6aeea69..b563ca3340 100644 --- a/src/classify/adaptive.cpp +++ b/src/classify/adaptive.cpp @@ -44,8 +44,6 @@ using tesseract::TFile; * @param ClassId class id to associate with new class * * @note Globals: none - * @note Exceptions: none - * @note History: Thu Mar 14 13:06:09 1991, DSJ, Created. */ void AddAdaptedClass(ADAPT_TEMPLATES Templates, ADAPT_CLASS Class, @@ -75,8 +73,6 @@ void AddAdaptedClass(ADAPT_TEMPLATES Templates, * @param Config config to be freed * * @note Globals: none - * @note Exceptions: none - * @note History: Thu Mar 14 13:34:23 1991, DSJ, Created. */ void FreeTempConfig(TEMP_CONFIG Config) { assert (Config != nullptr); @@ -105,8 +101,6 @@ void FreePermConfig(PERM_CONFIG Config) { * @return Ptr to new class data structure. * * @note Globals: none - * @note Exceptions: none - * @note History: Thu Mar 14 12:58:13 1991, DSJ, Created. */ ADAPT_CLASS NewAdaptedClass() { ADAPT_CLASS Class; @@ -156,8 +150,6 @@ namespace tesseract { * @return Ptr to new adapted templates. * * @note Globals: none - * @note Exceptions: none - * @note History: Fri Mar 8 10:15:28 1991, DSJ, Created. */ ADAPT_TEMPLATES Classify::NewAdaptedTemplates(bool InitFromUnicharset) { ADAPT_TEMPLATES Templates; @@ -210,8 +202,6 @@ void free_adapted_templates(ADAPT_TEMPLATES templates) { * @return Ptr to new temp config. * * @note Globals: none - * @note Exceptions: none - * @note History: Thu Mar 14 13:28:21 1991, DSJ, Created. */ TEMP_CONFIG NewTempConfig(int MaxProtoId, int FontinfoId) { int NumProtos = MaxProtoId + 1; @@ -237,8 +227,6 @@ TEMP_CONFIG NewTempConfig(int MaxProtoId, int FontinfoId) { * @return Ptr to new temporary proto. * * @note Globals: none - * @note Exceptions: none - * @note History: Thu Mar 14 13:31:31 1991, DSJ, Created. */ TEMP_PROTO NewTempProto() { return (TEMP_PROTO)malloc(sizeof(TEMP_PROTO_STRUCT)); @@ -255,8 +243,6 @@ namespace tesseract { * @param Templates adapted templates to print to File * * @note Globals: none - * @note Exceptions: none - * @note History: Wed Mar 20 13:35:29 1991, DSJ, Created. */ void Classify::PrintAdaptedTemplates(FILE *File, ADAPT_TEMPLATES Templates) { INT_CLASS IClass; @@ -294,8 +280,6 @@ void Classify::PrintAdaptedTemplates(FILE *File, ADAPT_TEMPLATES Templates) { * @return Ptr to new adapted class. * * @note Globals: none - * @note Exceptions: none - * @note History: Tue Mar 19 14:11:01 1991, DSJ, Created. */ ADAPT_CLASS ReadAdaptedClass(TFile *fp) { int NumTempProtos; @@ -347,8 +331,6 @@ namespace tesseract { * @return Ptr to adapted templates read from file. * * @note Globals: none - * @note Exceptions: none - * @note History: Mon Mar 18 15:18:10 1991, DSJ, Created. */ ADAPT_TEMPLATES Classify::ReadAdaptedTemplates(TFile *fp) { ADAPT_TEMPLATES Templates; @@ -379,8 +361,6 @@ ADAPT_TEMPLATES Classify::ReadAdaptedTemplates(TFile *fp) { * @return Ptr to new permanent configuration description. * * @note Globals: none - * @note Exceptions: none - * @note History: Tue Mar 19 14:25:26 1991, DSJ, Created. */ PERM_CONFIG ReadPermConfig(TFile *fp) { PERM_CONFIG Config = (PERM_CONFIG)malloc(sizeof(PERM_CONFIG_STRUCT)); @@ -405,8 +385,6 @@ PERM_CONFIG ReadPermConfig(TFile *fp) { * @return Ptr to new temporary configuration description. * * @note Globals: none - * @note Exceptions: none - * @note History: Tue Mar 19 14:29:59 1991, DSJ, Created. */ TEMP_CONFIG ReadTempConfig(TFile *fp) { TEMP_CONFIG Config = (TEMP_CONFIG)malloc(sizeof(TEMP_CONFIG_STRUCT)); @@ -430,8 +408,6 @@ TEMP_CONFIG ReadTempConfig(TFile *fp) { * @param NumConfigs number of configs in Class * * @note Globals: none - * @note Exceptions: none - * @note History: Tue Mar 19 13:33:51 1991, DSJ, Created. */ void WriteAdaptedClass(FILE *File, ADAPT_CLASS Class, int NumConfigs) { int NumTempProtos; @@ -476,8 +452,6 @@ namespace tesseract { * @param Templates set of adapted templates to write to File * * @note Globals: none - * @note Exceptions: none - * @note History: Mon Mar 18 15:07:32 1991, DSJ, Created. */ void Classify::WriteAdaptedTemplates(FILE *File, ADAPT_TEMPLATES Templates) { int i; @@ -506,8 +480,6 @@ void Classify::WriteAdaptedTemplates(FILE *File, ADAPT_TEMPLATES Templates) { * @param Config permanent config to write to File * * @note Globals: none - * @note Exceptions: none - * @note History: Tue Mar 19 13:55:44 1991, DSJ, Created. */ void WritePermConfig(FILE *File, PERM_CONFIG Config) { uint8_t NumAmbigs = 0; @@ -530,8 +502,6 @@ void WritePermConfig(FILE *File, PERM_CONFIG Config) { * @param Config temporary config to write to File * * @note Globals: none - * @note Exceptions: none - * @note History: Tue Mar 19 14:00:28 1991, DSJ, Created. */ void WriteTempConfig(FILE *File, TEMP_CONFIG Config) { assert (Config != nullptr); diff --git a/src/classify/adaptmatch.cpp b/src/classify/adaptmatch.cpp index cb482dc6cc..074612bad2 100644 --- a/src/classify/adaptmatch.cpp +++ b/src/classify/adaptmatch.cpp @@ -2,7 +2,6 @@ ** Filename: adaptmatch.cpp ** Purpose: High level adaptive matcher. ** Author: Dan Johnson - ** History: Mon Mar 11 10:00:10 1991, DSJ, Created. ** ** (c) Copyright Hewlett-Packard Company, 1988. ** Licensed under the Apache License, Version 2.0 (the "License"); @@ -183,9 +182,6 @@ namespace tesseract { * This routine also performs some simple speckle * filtering. * - * @note Exceptions: none - * @note History: Mon Mar 11 10:00:58 1991, DSJ, Created. - * * @param Blob blob to be classified * @param[out] Choices List of choices found by adaptive matcher. * filled on return with the choices found by the @@ -460,9 +456,6 @@ void Classify::LearnPieces(const char* fontname, int start, int length, * - #AdaptedTemplates current set of adapted templates * - #classify_save_adapted_templates TRUE if templates should be saved * - #classify_enable_adaptive_matcher TRUE if adaptive matcher is enabled - * - * @note Exceptions: none - * @note History: Tue Mar 19 14:37:06 1991, DSJ, Created. */ void Classify::EndAdaptiveClassifier() { STRING Filename; @@ -531,7 +524,6 @@ void Classify::EndAdaptiveClassifier() { * BuiltInCutoffsFile file to get avg. feat per class from * classify_use_pre_adapted_templates * enables use of pre-adapted templates - * @note History: Mon Mar 11 12:49:34 1991, DSJ, Created. */ void Classify::InitAdaptiveClassifier(TessdataManager* mgr) { if (!classify_enable_adaptive_matcher) @@ -658,9 +650,6 @@ void Classify::StartBackupAdaptiveClassifier() { * Globals: * - #EnableLearning * set to TRUE by this routine - * - * @note Exceptions: none - * @note History: Mon Apr 15 16:39:29 1991, DSJ, Created. */ void Classify::SettupPass1() { EnableLearning = classify_enable_learning; @@ -678,9 +667,6 @@ void Classify::SettupPass1() { * * Globals: * - #EnableLearning set to FALSE by this routine - * - * @note Exceptions: none - * @note History: Mon Apr 15 16:39:29 1991, DSJ, Created. */ void Classify::SettupPass2() { EnableLearning = FALSE; @@ -705,9 +691,6 @@ void Classify::SettupPass2() { * - #AllProtosOn dummy mask with all 1's * - BaselineCutoffs kludge needed to get cutoffs * - #PreTrainedTemplates kludge needed to get cutoffs - * - * @note Exceptions: none - * @note History: Thu Mar 14 12:49:39 1991, DSJ, Created. */ void Classify::InitAdaptedClass(TBLOB *Blob, CLASS_ID ClassId, @@ -801,8 +784,6 @@ void Classify::InitAdaptedClass(TBLOB *Blob, * * @return Number of pico-features returned (0 if * an error occurred) - * @note Exceptions: none - * @note History: Tue Mar 12 17:55:18 1991, DSJ, Created. */ int Classify::GetAdaptiveFeatures(TBLOB *Blob, INT_FEATURE_ARRAY IntFeatures, @@ -838,9 +819,7 @@ int Classify::GetAdaptiveFeatures(TBLOB *Blob, * * @param word current word * - * @return TRUE or FALSE - * @note Exceptions: none - * @note History: Thu May 30 14:25:06 1991, DSJ, Created. + * @return true or false */ bool Classify::AdaptableWord(WERD_RES* word) { if (word->best_choice == nullptr) return false; @@ -875,8 +854,6 @@ bool Classify::AdaptableWord(WERD_RES* word) { * - AllConfigsOn dummy mask to match against all configs * * @return none - * @note Exceptions: none - * @note History: Thu Mar 14 09:36:03 1991, DSJ, Created. */ void Classify::AdaptToChar(TBLOB* Blob, CLASS_ID ClassId, int FontinfoId, float Threshold, @@ -1018,9 +995,6 @@ void Classify::DisplayAdaptedChar(TBLOB* blob, INT_CLASS_STRUCT* int_class) { * * @param new_result new result to add * @param[out] results results to add new result to - * - * @note Exceptions: none - * @note History: Tue Mar 12 18:19:29 1991, DSJ, Created. */ void Classify::AddNewResult(const UnicharRating& new_result, ADAPT_RESULTS *results) { @@ -1072,9 +1046,6 @@ void Classify::AddNewResult(const UnicharRating& new_result, * @param[out] results place to put match results * @param int_features * @param fx_info - * - * @note Exceptions: none - * @note History: Tue Mar 12 19:40:36 1991, DSJ, Created. */ void Classify::AmbigClassifier( const GenericVector& int_features, @@ -1295,8 +1266,6 @@ double Classify::ComputeCorrectedRating(bool debug, int unichar_id, * @param fx_info * * @return Array of possible ambiguous chars that should be checked. - * @note Exceptions: none - * @note History: Tue Mar 12 19:38:03 1991, DSJ, Created. */ UNICHAR_ID *Classify::BaselineClassifier( TBLOB *Blob, const GenericVector& int_features, @@ -1343,9 +1312,6 @@ UNICHAR_ID *Classify::BaselineClassifier( * - CharNormCutoffs expected num features for each class * - AllProtosOn mask that enables all protos * - AllConfigsOn mask that enables all configs - * - * @note Exceptions: none - * @note History: Tue Mar 12 16:02:52 1991, DSJ, Created. */ int Classify::CharNormClassifier(TBLOB *blob, const TrainingSample& sample, @@ -1434,9 +1400,6 @@ int Classify::CharNormTrainingSample(bool pruner_only, * * Globals: * - matcher_avg_noise_size avg. length of a noise blob - * - * @note Exceptions: none - * @note History: Tue Mar 12 18:36:52 1991, DSJ, Created. */ void Classify::ClassifyAsNoise(ADAPT_RESULTS *results) { float rating = results->BlobLength / matcher_avg_noise_size; @@ -1535,9 +1498,6 @@ void Classify::ConvertMatchesToChoices(const DENORM& denorm, const TBOX& box, * @param Results results of match being debugged * * Globals: none - * - * @note Exceptions: none - * @note History: Wed Mar 13 16:44:41 1991, DSJ, Created. */ void Classify::DebugAdaptiveClassifier(TBLOB *blob, ADAPT_RESULTS *Results) { @@ -1571,9 +1531,6 @@ void Classify::DebugAdaptiveClassifier(TBLOB *blob, * - PreTrainedTemplates built-in training templates * - AdaptedTemplates templates adapted for this page * - matcher_reliable_adaptive_result rating limit for a great match - * - * @note Exceptions: none - * @note History: Tue Mar 12 08:50:11 1991, DSJ, Created. */ void Classify::DoAdaptiveMatch(TBLOB *Blob, ADAPT_RESULTS *Results) { UNICHAR_ID *Ambiguities; @@ -1629,8 +1586,6 @@ void Classify::DoAdaptiveMatch(TBLOB *Blob, ADAPT_RESULTS *Results) { * - PreTrainedTemplates built-in templates * * @return String containing all possible ambiguous classes. - * @note Exceptions: none - * @note History: Fri Mar 15 08:08:22 1991, DSJ, Created. */ UNICHAR_ID *Classify::GetAmbiguities(TBLOB *Blob, CLASS_ID CorrectClass) { @@ -1717,8 +1672,6 @@ bool Classify::LooksLikeGarbage(TBLOB *blob) { * Globals: * * @return Number of features extracted or 0 if an error occurred. - * @note Exceptions: none - * @note History: Tue May 28 10:40:52 1991, DSJ, Created. */ int Classify::GetCharNormFeature(const INT_FX_RESULT_STRUCT& fx_info, INT_TEMPLATES templates, @@ -1781,8 +1734,6 @@ void Classify::ComputeCharNormArrays(FEATURE_STRUCT* norm_feature, * * @return The id of the new config created, a negative integer in * case of error. - * @note Exceptions: none - * @note History: Fri Mar 15 08:49:46 1991, DSJ, Created. */ int Classify::MakeNewTemporaryConfig(ADAPT_TEMPLATES Templates, CLASS_ID ClassId, @@ -1878,8 +1829,6 @@ int Classify::MakeNewTemporaryConfig(ADAPT_TEMPLATES Templates, * Globals: none * * @return Max proto id in class after all protos have been added. - * Exceptions: none - * History: Fri Mar 15 11:39:38 1991, DSJ, Created. */ PROTO_ID Classify::MakeNewTempProtos(FEATURE_SET Features, int NumBadFeat, @@ -1966,9 +1915,6 @@ PROTO_ID Classify::MakeNewTempProtos(FEATURE_SET Features, * @param Blob current blob being adapted to * * Globals: none - * - * @note Exceptions: none - * @note History: Thu Mar 14 15:54:08 1991, DSJ, Created. */ void Classify::MakePermanent(ADAPT_TEMPLATES Templates, CLASS_ID ClassId, @@ -2029,8 +1975,6 @@ void Classify::MakePermanent(ADAPT_TEMPLATES Templates, * Globals: none * * @return TRUE if TempProto is converted, FALSE otherwise - * @note Exceptions: none - * @note History: Thu Mar 14 18:49:54 1991, DSJ, Created. */ int MakeTempProtoPerm(void *item1, void *item2) { ADAPT_CLASS Class; @@ -2064,9 +2008,6 @@ namespace tesseract { * @param results match results to write to File * * Globals: none - * - * @note Exceptions: none - * @note History: Mon Mar 18 09:24:53 1991, DSJ, Created. */ void Classify::PrintAdaptiveMatchResults(const ADAPT_RESULTS& results) { for (int i = 0; i < results.match.size(); ++i) { @@ -2087,9 +2028,6 @@ void Classify::PrintAdaptiveMatchResults(const ADAPT_RESULTS& results) { * * Globals: * - matcher_bad_match_pad defines a "bad match" - * - * @note Exceptions: none - * @note History: Tue Mar 12 13:51:03 1991, DSJ, Created. */ void Classify::RemoveBadMatches(ADAPT_RESULTS *Results) { int Next, NextGood; @@ -2150,8 +2088,6 @@ void Classify::RemoveBadMatches(ADAPT_RESULTS *Results) { * present. * * @param Results contains matches to be filtered - * - * @note History: Tue Mar 12 13:51:03 1991, DSJ, Created. */ void Classify::RemoveExtraPuncs(ADAPT_RESULTS *Results) { int Next, NextGood; @@ -2200,9 +2136,6 @@ void Classify::RemoveExtraPuncs(ADAPT_RESULTS *Results) { * * Globals: * - matcher_good_threshold default good match rating - * - * @note Exceptions: none - * @note History: Tue Apr 9 08:33:13 1991, DSJ, Created. */ void Classify::SetAdaptiveThreshold(float Threshold) { Threshold = (Threshold == matcher_good_threshold) ? 0.9: (1.0 - Threshold); @@ -2220,9 +2153,6 @@ void Classify::SetAdaptiveThreshold(float Threshold) { * @param shape_id classifier id to work with * @param features features of the unknown character * @param num_features Number of features in the features array. - * - * @note Exceptions: none - * @note History: Fri Mar 22 08:43:52 1991, DSJ, Created. */ void Classify::ShowBestMatchFor(int shape_id, diff --git a/src/classify/cluster.cpp b/src/classify/cluster.cpp index 5541f840d4..f4f9048343 100644 --- a/src/classify/cluster.cpp +++ b/src/classify/cluster.cpp @@ -2,7 +2,6 @@ ** Filename: cluster.c ** Purpose: Routines for clustering points in N-D space ** Author: Dan Johnson - ** History: 5/29/89, DSJ, Created. ** ** (c) Copyright Hewlett-Packard Company, 1988. ** Licensed under the Apache License, Version 2.0 (the "License"); @@ -392,9 +391,7 @@ double InvertMatrix(const float* input, int size, float* inv); * * @param SampleSize number of dimensions in feature space * @param ParamDesc description of each dimension - * @return pointer to the new clusterer data structure - * @note Exceptions: None - * @note History: 5/29/89, DSJ, Created. + * @return pointer to the new clusterer data structure */ CLUSTERER * MakeClusterer (int16_t SampleSize, const PARAM_DESC ParamDesc[]) { @@ -503,8 +500,6 @@ SAMPLE* MakeSample(CLUSTERER * Clusterer, const float* Feature, * @param Config parameters which control clustering process * * @return Pointer to a list of prototypes - * @note Exceptions: None - * @note History: 5/29/89, DSJ, Created. */ LIST ClusterSamples(CLUSTERER *Clusterer, CLUSTERCONFIG *Config) { //only create cluster tree if samples have never been clustered before @@ -537,8 +532,6 @@ LIST ClusterSamples(CLUSTERER *Clusterer, CLUSTERCONFIG *Config) { * via calls to GetSamples are no longer valid. * @param Clusterer pointer to data structure to be freed * @return None - * @note Exceptions: None - * @note History: 6/6/89, DSJ, Created. */ void FreeClusterer(CLUSTERER *Clusterer) { if (Clusterer != nullptr) { @@ -564,8 +557,6 @@ void FreeClusterer(CLUSTERER *Clusterer) { * pointed to by the prototypes are not freed. * @param ProtoList pointer to list of prototypes to be freed * @return None - * @note Exceptions: None - * @note History: 6/6/89, DSJ, Created. */ void FreeProtoList(LIST *ProtoList) { destroy_nodes(*ProtoList, FreePrototype); @@ -578,8 +569,6 @@ void FreeProtoList(LIST *ProtoList) { * deallocated by this routine. * @param arg prototype data structure to be deallocated * @return None - * @note Exceptions: None - * @note History: 5/30/89, DSJ, Created. */ void FreePrototype(void *arg) { //PROTOTYPE *Prototype) PROTOTYPE *Prototype = (PROTOTYPE *) arg; @@ -611,8 +600,6 @@ void FreePrototype(void *arg) { //PROTOTYPE *Prototype) * before NextSample() to initialize the search. * @param SearchState ptr to list containing clusters to be searched * @return Pointer to the next leaf cluster (sample) or nullptr. - * @note Exceptions: None - * @note History: 6/16/89, DSJ, Created. */ CLUSTER *NextSample(LIST *SearchState) { CLUSTER *Cluster; @@ -635,8 +622,6 @@ CLUSTER *NextSample(LIST *SearchState) { * @param Proto prototype to return mean of * @param Dimension dimension whose mean is to be returned * @return Mean of Prototype in Dimension - * @note Exceptions: none - * @note History: 7/6/89, DSJ, Created. */ float Mean(PROTOTYPE *Proto, uint16_t Dimension) { return (Proto->Mean[Dimension]); @@ -648,8 +633,6 @@ float Mean(PROTOTYPE *Proto, uint16_t Dimension) { * @param Proto prototype to return standard deviation of * @param Dimension dimension whose stddev is to be returned * @return Standard deviation of Prototype in Dimension - * @note Exceptions: none - * @note History: 7/6/89, DSJ, Created. */ float StandardDeviation(PROTOTYPE *Proto, uint16_t Dimension) { switch (Proto->Style) { @@ -689,8 +672,6 @@ float StandardDeviation(PROTOTYPE *Proto, uint16_t Dimension) { * all of the samples. * @param Clusterer data structure holdings samples to be clustered * @return None (the Clusterer data structure is changed) - * @note Exceptions: None - * @note History: 5/29/89, DSJ, Created. */ void CreateClusterTree(CLUSTERER *Clusterer) { ClusteringContext context; @@ -787,9 +768,6 @@ void MakePotentialClusters(ClusteringContext *context, * @param Cluster cluster whose nearest neighbor is to be found * @param Distance ptr to variable to report distance found * @return Pointer to the nearest neighbor of Cluster, or nullptr - * @note Exceptions: none - * @note History: 5/29/89, DSJ, Created. - * 7/13/89, DSJ, Removed visibility of kd-tree node data struct */ CLUSTER * FindNearestNeighbor(KDTREE * Tree, CLUSTER * Cluster, float * Distance) @@ -826,9 +804,6 @@ FindNearestNeighbor(KDTREE * Tree, CLUSTER * Cluster, float * Distance) * @param Clusterer current clustering environment * @param TempCluster potential cluster to make permanent * @return Pointer to the new permanent cluster - * @note Exceptions: none - * @note History: 5/29/89, DSJ, Created. - * 7/13/89, DSJ, Removed visibility of kd-tree node data struct */ CLUSTER *MakeNewCluster(CLUSTERER *Clusterer, TEMPCLUSTER *TempCluster) { CLUSTER *Cluster; @@ -871,8 +846,6 @@ CLUSTER *MakeNewCluster(CLUSTERER *Clusterer, TEMPCLUSTER *TempCluster) { * @param m array to hold mean of new cluster * @param m1, m2 arrays containing means of old clusters * @return The number of samples in the new cluster. - * @note Exceptions: None - * @note History: 5/31/89, DSJ, Created. */ int32_t MergeClusters(int16_t N, PARAM_DESC ParamDesc[], @@ -915,8 +888,6 @@ int32_t MergeClusters(int16_t N, * @param Clusterer data structure holding cluster tree * @param Config parameters used to control prototype generation * @return None - * @note Exceptions: None - * @note History: 5/30/89, DSJ, Created. */ void ComputePrototypes(CLUSTERER *Clusterer, CLUSTERCONFIG *Config) { LIST ClusterStack = NIL_LIST; @@ -960,8 +931,6 @@ void ComputePrototypes(CLUSTERER *Clusterer, CLUSTERCONFIG *Config) { * @param Config parameters used to control prototype generation * @param Cluster cluster to be made into a prototype * @return Pointer to new prototype or nullptr - * @note Exceptions: None - * @note History: 6/19/89, DSJ, Created. */ PROTOTYPE *MakePrototype(CLUSTERER *Clusterer, CLUSTERCONFIG *Config, @@ -1052,10 +1021,6 @@ PROTOTYPE *MakePrototype(CLUSTERER *Clusterer, * @param Style type of prototype to be generated * @param MinSamples minimum number of samples in a cluster * @return Pointer to degenerate prototype or nullptr. - * @note Exceptions: None - * @note History: 6/20/89, DSJ, Created. - * 7/12/89, DSJ, Changed name and added check for 0 stddev. - * 8/8/89, DSJ, Removed check for 0 stddev (handled elsewhere). */ PROTOTYPE *MakeDegenerateProto( //this was MinSample uint16_t N, @@ -1203,8 +1168,6 @@ PROTOTYPE *TestEllipticalProto(CLUSTERER *Clusterer, * @param Statistics statistical info about cluster * @param Buckets histogram struct used to analyze distribution * @return Pointer to new spherical prototype or nullptr. - * @note Exceptions: None - * @note History: 6/1/89, DSJ, Created. */ PROTOTYPE *MakeSphericalProto(CLUSTERER *Clusterer, CLUSTER *Cluster, @@ -1240,8 +1203,6 @@ PROTOTYPE *MakeSphericalProto(CLUSTERER *Clusterer, * @param Statistics statistical info about cluster * @param Buckets histogram struct used to analyze distribution * @return Pointer to new elliptical prototype or nullptr. - * @note Exceptions: None - * @note History: 6/12/89, DSJ, Created. */ PROTOTYPE *MakeEllipticalProto(CLUSTERER *Clusterer, CLUSTER *Cluster, @@ -1282,8 +1243,6 @@ PROTOTYPE *MakeEllipticalProto(CLUSTERER *Clusterer, * @param NormalBuckets histogram struct used to analyze distribution * @param Confidence confidence level for alternate distributions * @return Pointer to new mixed prototype or nullptr. - * @note Exceptions: None - * @note History: 6/12/89, DSJ, Created. */ PROTOTYPE *MakeMixedProto(CLUSTERER *Clusterer, CLUSTER *Cluster, @@ -1343,8 +1302,6 @@ PROTOTYPE *MakeMixedProto(CLUSTERER *Clusterer, * @param Proto prototype whose dimension is to be altered * @param ParamDesc description of specified dimension * @return None - * @note Exceptions: None - * @note History: 6/20/89, DSJ, Created. */ void MakeDimRandom(uint16_t i, PROTOTYPE *Proto, PARAM_DESC *ParamDesc) { Proto->Distrib[i] = D_random; @@ -1367,8 +1324,6 @@ void MakeDimRandom(uint16_t i, PROTOTYPE *Proto, PARAM_DESC *ParamDesc) { * @param Proto prototype whose dimension is to be altered * @param Statistics statistical info about prototype * @return None - * @note Exceptions: None - * @note History: 6/20/89, DSJ, Created. */ void MakeDimUniform(uint16_t i, PROTOTYPE *Proto, STATISTICS *Statistics) { Proto->Distrib[i] = uniform; @@ -1402,8 +1357,6 @@ void MakeDimUniform(uint16_t i, PROTOTYPE *Proto, STATISTICS *Statistics) { * @param ParamDesc array of dimension descriptions * @param Cluster cluster whose stats are to be computed * @return Pointer to new data structure containing statistics - * @note Exceptions: None - * @note History: 6/2/89, DSJ, Created. */ STATISTICS * ComputeStatistics (int16_t N, PARAM_DESC ParamDesc[], CLUSTER * Cluster) { @@ -1490,8 +1443,6 @@ ComputeStatistics (int16_t N, PARAM_DESC ParamDesc[], CLUSTER * Cluster) { * @param Cluster cluster to be made into a spherical prototype * @param Statistics statistical info about samples in cluster * @return Pointer to a new spherical prototype data structure - * @note Exceptions: None - * @note History: 6/19/89, DSJ, Created. */ PROTOTYPE *NewSphericalProto(uint16_t N, CLUSTER *Cluster, @@ -1523,8 +1474,6 @@ PROTOTYPE *NewSphericalProto(uint16_t N, * @param Cluster cluster to be made into an elliptical prototype * @param Statistics statistical info about samples in cluster * @return Pointer to a new elliptical prototype data structure - * @note Exceptions: None - * @note History: 6/19/89, DSJ, Created. */ PROTOTYPE *NewEllipticalProto(int16_t N, CLUSTER *Cluster, @@ -1567,8 +1516,6 @@ PROTOTYPE *NewEllipticalProto(int16_t N, * @param Cluster cluster to be made into a mixed prototype * @param Statistics statistical info about samples in cluster * @return Pointer to a new mixed prototype data structure - * @note Exceptions: None - * @note History: 6/19/89, DSJ, Created. */ PROTOTYPE *NewMixedProto(int16_t N, CLUSTER *Cluster, STATISTICS *Statistics) { PROTOTYPE *Proto; @@ -1591,8 +1538,6 @@ PROTOTYPE *NewMixedProto(int16_t N, CLUSTER *Cluster, STATISTICS *Statistics) { * @param N number of dimensions * @param Cluster cluster to be made into a prototype * @return Pointer to new simple prototype - * @note Exceptions: None - * @note History: 6/19/89, DSJ, Created. */ PROTOTYPE *NewSimpleProto(int16_t N, CLUSTER *Cluster) { PROTOTYPE *Proto; @@ -1631,8 +1576,6 @@ PROTOTYPE *NewSimpleProto(int16_t N, CLUSTER *Cluster) { * @param CoVariance ptr to a covariance matrix * @param Independence max off-diagonal correlation coefficient * @return TRUE if dimensions are independent, FALSE otherwise - * @note Exceptions: None - * @note History: 6/4/89, DSJ, Created. */ bool Independent(PARAM_DESC* ParamDesc, @@ -1679,8 +1622,6 @@ Independent(PARAM_DESC* ParamDesc, * @param SampleCount number of samples that are available * @param Confidence probability of a Type I error * @return Bucket data structure - * @note Exceptions: none - * @note History: Thu Aug 3 12:58:10 1989, DSJ, Created. */ BUCKETS *GetBuckets(CLUSTERER* clusterer, DISTRIBUTION Distribution, @@ -1726,8 +1667,6 @@ BUCKETS *GetBuckets(CLUSTERER* clusterer, * @param SampleCount number of samples that are available * @param Confidence probability of a Type I error * @return Pointer to new histogram data structure - * @note Exceptions: None - * @note History: 6/4/89, DSJ, Created. */ BUCKETS *MakeBuckets(DISTRIBUTION Distribution, uint32_t SampleCount, @@ -1823,8 +1762,6 @@ BUCKETS *MakeBuckets(DISTRIBUTION Distribution, * equally valid for other alpha's, which may not be true. * @param SampleCount number of samples to be tested * @return Optimum number of histogram buckets - * @note Exceptions: None - * @note History: 6/5/89, DSJ, Created. */ uint16_t OptimumNumberOfBuckets(uint32_t SampleCount) { uint8_t Last, Next; @@ -1859,8 +1796,6 @@ uint16_t OptimumNumberOfBuckets(uint32_t SampleCount) { * @param DegreesOfFreedom determines shape of distribution * @param Alpha probability of right tail * @return Desired chi-squared value - * @note Exceptions: none - * @note History: 6/5/89, DSJ, Created. */ double ComputeChiSquared (uint16_t DegreesOfFreedom, double Alpha) @@ -1911,11 +1846,8 @@ ComputeChiSquared (uint16_t DegreesOfFreedom, double Alpha) * @note Globals: * kNormalMean mean of a discrete normal distribution * kNormalVariance variance of a discrete normal distribution - * kNormalMagnitude magnitude of a discrete normal - *distribution + * kNormalMagnitude magnitude of a discrete normal distribution * @return The value of the normal distribution at x. - * @note Exceptions: None - * @note History: 6/4/89, DSJ, Created. */ double NormalDensity(int32_t x) { double Distance; @@ -1930,8 +1862,6 @@ double NormalDensity(int32_t x) { * range of the distribution is from 0 to BUCKETTABLESIZE. * @param x number to compute the uniform probability density for * @return The value of the uniform distribution at x. - * @note Exceptions: None - * @note History: 6/5/89, DSJ, Created. */ double UniformDensity(int32_t x) { static double UniformDistributionDensity = (double) 1.0 / BUCKETTABLESIZE; @@ -1949,8 +1879,6 @@ double UniformDensity(int32_t x) { * @param f2 value of function at x2 * @param Dx x2 - x1 (should always be positive) * @return Approximation of the integral of the function from x1 to x2. - * @note Exceptions: None - * @note History: 6/5/89, DSJ, Created. */ double Integral(double f1, double f2, double Dx) { return (f1 + f2) * Dx / 2.0; @@ -1975,8 +1903,6 @@ double Integral(double f1, double f2, double Dx) { * @param Mean "mean" of the distribution * @param StdDev "standard deviation" of the distribution * @return None (the Buckets data structure is filled in) - * @note Exceptions: None - * @note History: 6/5/89, DSJ, Created. */ void FillBuckets(BUCKETS *Buckets, CLUSTER *Cluster, @@ -2047,8 +1973,6 @@ void FillBuckets(BUCKETS *Buckets, * @param Mean mean of normal distribution * @param StdDev standard deviation of normal distribution * @return Bucket number into which x falls - * @note Exceptions: None - * @note History: 6/5/89, DSJ, Created. */ uint16_t NormalBucket(PARAM_DESC *ParamDesc, float x, @@ -2082,8 +2006,6 @@ uint16_t NormalBucket(PARAM_DESC *ParamDesc, * @param Mean center of range of uniform distribution * @param StdDev 1/2 the range of the uniform distribution * @return Bucket number into which x falls - * @note Exceptions: None - * @note History: 6/5/89, DSJ, Created. */ uint16_t UniformBucket(PARAM_DESC *ParamDesc, float x, @@ -2116,8 +2038,6 @@ uint16_t UniformBucket(PARAM_DESC *ParamDesc, * returned. * @param Buckets histogram data to perform chi-square test on * @return TRUE if samples match distribution, FALSE otherwise - * @note Exceptions: None - * @note History: 6/5/89, DSJ, Created. */ bool DistributionOK(BUCKETS* Buckets) { float FrequencyDifference; @@ -2144,8 +2064,6 @@ bool DistributionOK(BUCKETS* Buckets) { * data structure. * @param Statistics pointer to data structure to be freed * @return None - * @note Exceptions: None - * @note History: 6/5/89, DSJ, Created. */ void FreeStatistics(STATISTICS *Statistics) { free(Statistics->CoVariance); @@ -2173,9 +2091,6 @@ void FreeBuckets(BUCKETS *buckets) { * @param Cluster pointer to cluster to be freed * * @return None - * - * @note Exceptions: None - * @note History: 6/6/89, DSJ, Created. */ void FreeCluster(CLUSTER *Cluster) { if (Cluster != nullptr) { @@ -2196,8 +2111,6 @@ void FreeCluster(CLUSTER *Cluster) { * @param Distribution distribution being tested for * @param HistogramBuckets number of buckets in chi-square test * @return The number of degrees of freedom for a chi-square test - * @note Exceptions: none - * @note History: Thu Aug 3 14:04:18 1989, DSJ, Created. */ uint16_t DegreesOfFreedom(DISTRIBUTION Distribution, uint16_t HistogramBuckets) { static uint8_t DegreeOffsets[] = { 3, 3, 1 }; @@ -2218,8 +2131,6 @@ uint16_t DegreesOfFreedom(DISTRIBUTION Distribution, uint16_t HistogramBuckets) * @param arg1 current histogram being tested for a match * @param arg2 match key * @return TRUE if arg1 matches arg2 - * @note Exceptions: none - * @note History: Thu Aug 3 14:17:33 1989, DSJ, Created. */ int NumBucketsMatch(void *arg1, // BUCKETS *Histogram, void *arg2) { // uint16_t *DesiredNumberOfBuckets) @@ -2235,8 +2146,6 @@ int NumBucketsMatch(void *arg1, // BUCKETS *Histogram, * whose contents match Key. It is called by the list * delete_d routine. * @return TRUE if ListNode matches Key - * @note Exceptions: none - * @note History: Thu Aug 3 14:23:58 1989, DSJ, Created. */ int ListEntryMatch(void *arg1, //ListNode void *arg2) { //Key @@ -2251,8 +2160,6 @@ int ListEntryMatch(void *arg1, //ListNode * @param Buckets histogram data structure to adjust * @param NewSampleCount new sample count to adjust to * @return none - * @note Exceptions: none - * @note History: Thu Aug 3 14:31:14 1989, DSJ, Created. */ void AdjustBuckets(BUCKETS *Buckets, uint32_t NewSampleCount) { int i; @@ -2274,8 +2181,6 @@ void AdjustBuckets(BUCKETS *Buckets, uint32_t NewSampleCount) { * to zero. * @param Buckets histogram data structure to init * @return none - * @note Exceptions: none - * @note History: Thu Aug 3 14:31:14 1989, DSJ, Created. */ void InitBuckets(BUCKETS *Buckets) { int i; @@ -2297,8 +2202,6 @@ void InitBuckets(BUCKETS *Buckets) { * @param arg1 chi-squared struct being tested for a match * @param arg2 chi-squared struct that is the search key * @return TRUE if ChiStruct's Alpha matches SearchKey's Alpha - * @note Exceptions: none - * @note History: Thu Aug 3 14:17:33 1989, DSJ, Created. */ int AlphaMatch(void *arg1, //CHISTRUCT *ChiStruct, void *arg2) { //CHISTRUCT *SearchKey) @@ -2317,8 +2220,6 @@ int AlphaMatch(void *arg1, //CHISTRUCT *ChiStruct * @param DegreesOfFreedom degrees of freedom for new chi value * @param Alpha confidence level for new chi value * @return none - * @note Exceptions: none - * @note History: Fri Aug 4 11:04:59 1989, DSJ, Created. */ CHISTRUCT *NewChiStruct(uint16_t DegreesOfFreedom, double Alpha) { CHISTRUCT *NewChiStruct; @@ -2342,8 +2243,6 @@ CHISTRUCT *NewChiStruct(uint16_t DegreesOfFreedom, double Alpha) { * @param InitialGuess point to start solution search at * @param Accuracy maximum allowed error * @return Solution of function ( x for which f(x) = 0 ). - * @note Exceptions: none - * @note History: Fri Aug 4 11:08:59 1989, DSJ, Created. */ double Solve (SOLVEFUNC Function, @@ -2409,8 +2308,6 @@ void *FunctionParams, double InitialGuess, double Accuracy) * @param ChiParams contains degrees of freedom and alpha * @param x value of chi-squared to evaluate * @return Error between actual and desired area under the chi curve. - * @note Exceptions: none - * @note History: Fri Aug 4 12:48:41 1989, DSJ, Created. */ double ChiArea(CHISTRUCT *ChiParams, double x) { int i, N; @@ -2453,10 +2350,6 @@ double ChiArea(CHISTRUCT *ChiParams, double x) { * @param MaxIllegal max percentage of samples allowed to have * more than 1 feature in the cluster * @return TRUE if the cluster should be split, FALSE otherwise. - * @note Exceptions: none - * @note History: Wed Aug 30 11:13:05 1989, DSJ, Created. - * 2/22/90, DSJ, Added MaxIllegal control rather than always - * splitting illegal clusters. */ bool MultipleCharSamples(CLUSTERER* Clusterer, diff --git a/src/classify/clusttool.cpp b/src/classify/clusttool.cpp index 5df7f05829..af771525ec 100644 --- a/src/classify/clusttool.cpp +++ b/src/classify/clusttool.cpp @@ -219,8 +219,6 @@ float *ReadNFloats(TFile *fp, uint16_t N, float Buffer[]) { * @param ParamDesc array of param descriptors to write * @return None * @note Globals: None - * @note Exceptions: None - * @note History: 6/6/89, DSJ, Created. */ void WriteParamDesc(FILE *File, uint16_t N, const PARAM_DESC ParamDesc[]) { int i; @@ -248,8 +246,6 @@ void WriteParamDesc(FILE *File, uint16_t N, const PARAM_DESC ParamDesc[]) { * @param Proto prototype to write out * @return None * @note Globals: None - * @note Exceptions: None - * @note History: 6/12/89, DSJ, Created. */ void WritePrototype(FILE *File, uint16_t N, PROTOTYPE *Proto) { int i; @@ -298,8 +294,6 @@ void WritePrototype(FILE *File, uint16_t N, PROTOTYPE *Proto) { * @param Array array of floats to write * @return None * @note Globals: None - * @note Exceptions: None - * @note History: 6/6/89, DSJ, Created. */ void WriteNFloats(FILE * File, uint16_t N, float Array[]) { for (int i = 0; i < N; i++) @@ -315,8 +309,6 @@ void WriteNFloats(FILE * File, uint16_t N, float Array[]) { * @param ProtoStyle prototype style to write * @return None * @note Globals: None - * @note Exceptions: None - * @note History: 6/8/89, DSJ, Created. */ void WriteProtoStyle(FILE *File, PROTOSTYLE ProtoStyle) { switch (ProtoStyle) { @@ -348,9 +340,7 @@ void WriteProtoStyle(FILE *File, PROTOSTYLE ProtoStyle) { * @param WriteInsigProtos TRUE to write out insignificants * @note Globals: None * @return None - * @note Exceptions: None - * @note History: 6/12/89, DSJ, Created. -*/ + / void WriteProtoList(FILE* File, uint16_t N, PARAM_DESC* ParamDesc, LIST ProtoList, bool WriteSigProtos, diff --git a/src/classify/cutoffs.cpp b/src/classify/cutoffs.cpp index dce414ff97..1daa40cc1f 100644 --- a/src/classify/cutoffs.cpp +++ b/src/classify/cutoffs.cpp @@ -42,8 +42,6 @@ namespace tesseract { * @param Cutoffs array to put cutoffs into * @return none * @note Globals: none - * @note Exceptions: none - * @note History: Wed Feb 20 09:38:26 1991, DSJ, Created. */ void Classify::ReadNewCutoffs(TFile* fp, CLASS_CUTOFF_ARRAY Cutoffs) { char Class[UNICHAR_LEN + 1]; diff --git a/src/classify/float2int.cpp b/src/classify/float2int.cpp index 3de261071c..21833d2773 100644 --- a/src/classify/float2int.cpp +++ b/src/classify/float2int.cpp @@ -40,9 +40,6 @@ namespace tesseract { * - none * * @param char_norm_array array to be cleared - * - * @note Exceptions: none - * @note History: Wed Feb 20 11:20:54 1991, DSJ, Created. */ void Classify::ClearCharNormArray(uint8_t* char_norm_array) { memset(char_norm_array, 0, sizeof(*char_norm_array) * unicharset.size()); @@ -61,9 +58,6 @@ void Classify::ClearCharNormArray(uint8_t* char_norm_array) { * * @param norm_feature character normalization feature * @param[out] char_norm_array place to put results of size unicharset.size() - * - * @note Exceptions: none - * @note History: Wed Feb 20 11:20:54 1991, DSJ, Created. */ void Classify::ComputeIntCharNormArray(const FEATURE_STRUCT& norm_feature, uint8_t* char_norm_array) { @@ -92,9 +86,6 @@ void Classify::ComputeIntCharNormArray(const FEATURE_STRUCT& norm_feature, * * @param Features floating point pico-features to be converted * @param[out] IntFeatures array to put converted features into - * - * @note Exceptions: none - * @note History: Wed Feb 20 10:58:45 1991, DSJ, Created. */ void Classify::ComputeIntFeatures(FEATURE_SET Features, INT_FEATURE_ARRAY IntFeatures) { diff --git a/src/classify/fpoint.cpp b/src/classify/fpoint.cpp index e5bc6ed42c..e13231e5d3 100644 --- a/src/classify/fpoint.cpp +++ b/src/classify/fpoint.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - ** Filename: fpoint.c + ** Filename: fpoint.cpp ** Purpose: Abstract data type for a 2D point (floating point coords) ** Author: Dan Johnson ** @@ -40,8 +40,6 @@ float DistanceBetween(FPOINT A, FPOINT B) { * @param FullScale value to associate with 2*pi * @return none * @note Globals: none - * @note Exceptions: none - * @note History: Wed Mar 28 14:27:25 1990, DSJ, Created. */ float NormalizedAngleFrom(FPOINT *Point1, FPOINT *Point2, float FullScale) { float NumRadsInCircle = 2.0 * M_PI; diff --git a/src/classify/intmatcher.cpp b/src/classify/intmatcher.cpp index f53ab19e39..2f5be942c8 100644 --- a/src/classify/intmatcher.cpp +++ b/src/classify/intmatcher.cpp @@ -466,8 +466,6 @@ int Classify::PruneClasses(const INT_TEMPLATES_STRUCT* int_templates, * param Result Class rating & configuration: (0.0 -> 1.0), 0=bad, 1=good * param Debug Debugger flag: 1=debugger on * @return none - * @note Exceptions: none - * @note History: Tue Feb 19 16:36:23 MST 1991, RWM, Created. */ void IntegerMatcher::Match(INT_CLASS ClassTemplate, BIT_VECTOR ProtoMask, @@ -547,8 +545,6 @@ void IntegerMatcher::Match(INT_CLASS ClassTemplate, * param AdaptProtoThreshold Threshold for good protos * param Debug Debugger flag: 1=debugger on * @return Number of good protos in ProtoArray. - * @note Exceptions: none - * @note History: Tue Mar 12 17:09:26 MST 1991, RWM, Created */ int IntegerMatcher::FindGoodProtos( INT_CLASS ClassTemplate, @@ -618,7 +614,6 @@ int IntegerMatcher::FindGoodProtos( * @param AdaptFeatureThreshold Threshold for bad features * @param Debug Debugger flag: 1=debugger on * @return Number of bad features in FeatureArray. - * @note History: Tue Mar 12 17:09:26 MST 1991, RWM, Created */ int IntegerMatcher::FindBadFeatures( INT_CLASS ClassTemplate, @@ -717,8 +712,6 @@ void ScratchEvidence::ClearFeatureEvidence(const INT_CLASS class_template) { /** * Print debugging information for Configurations * @return none - * @note Exceptions: none - * @note History: Wed Feb 27 14:12:28 MST 1991, RWM, Created. */ void IMDebugConfiguration(int FeatureNum, uint16_t ActualProtoNum, @@ -740,8 +733,6 @@ void IMDebugConfiguration(int FeatureNum, /** * Print debugging information for Configurations * @return none - * @note Exceptions: none - * @note History: Wed Feb 27 14:12:28 MST 1991, RWM, Created. */ void IMDebugConfigurationSum(int FeatureNum, uint8_t *FeatureEvidence, @@ -913,8 +904,6 @@ int IntegerMatcher::UpdateTablesForFeature( /** * Print debugging information for Configurations * @return none - * @note Exceptions: none - * @note History: Wed Feb 27 14:12:28 MST 1991, RWM, Created. */ #ifndef GRAPHICS_DISABLED void IntegerMatcher::DebugFeatureProtoError( @@ -1174,8 +1163,6 @@ void ScratchEvidence::NormalizeSums( * Find the best match for the current class and update the Result * with the configuration and match rating. * @return The best normalized sum of evidences - * @note Exceptions: none - * @note History: Wed Feb 27 14:12:28 MST 1991, RWM, Created. */ int IntegerMatcher::FindBestMatch( INT_CLASS class_template, @@ -1224,8 +1211,6 @@ float IntegerMatcher::ApplyCNCorrection(float rating, int blob_length, * @param ra Key array [1..n] * @param rb Index array [1..n] * @return none - * @note Exceptions: none - * @note History: Tue Feb 19 10:24:24 MST 1991, RWM, Created. */ void HeapSort (int n, int ra[], int rb[]) { diff --git a/src/classify/intproto.cpp b/src/classify/intproto.cpp index 9dd47d4630..a400012dd6 100644 --- a/src/classify/intproto.cpp +++ b/src/classify/intproto.cpp @@ -231,9 +231,6 @@ INT_FEATURE_STRUCT::INT_FEATURE_STRUCT(int x, int y, int theta) * @param Class class data structure to add to templates * * Globals: none - * - * @note Exceptions: none - * @note History: Mon Feb 11 11:52:08 1991, DSJ, Created. */ void AddIntClass(INT_TEMPLATES Templates, CLASS_ID ClassId, INT_CLASS Class) { int Pruner; @@ -264,8 +261,6 @@ void AddIntClass(INT_TEMPLATES Templates, CLASS_ID ClassId, INT_CLASS Class) { * Globals: none * * @return Index of next free config. - * @note Exceptions: none - * @note History: Mon Feb 11 14:44:40 1991, DSJ, Created. */ int AddIntConfig(INT_CLASS Class) { int Index; @@ -287,8 +282,6 @@ int AddIntConfig(INT_CLASS Class) { * Globals: none * * @return Proto index of new proto. - * @note Exceptions: none - * @note History: Mon Feb 11 13:26:41 1991, DSJ, Created. */ int AddIntProto(INT_CLASS Class) { int Index; @@ -336,8 +329,6 @@ int AddIntProto(INT_CLASS Class) { * @param ClassId class id corresponding to Proto * @param Templates set of templates containing class pruner * @return none - * @note Exceptions: none - * @note History: Wed Feb 13 08:49:54 1991, DSJ, Created. */ void AddProtoToClassPruner (PROTO Proto, CLASS_ID ClassId, INT_TEMPLATES Templates) @@ -378,8 +369,6 @@ void AddProtoToClassPruner (PROTO Proto, CLASS_ID ClassId, * @param debug debug flag * @note Globals: none * @return none - * @note Exceptions: none - * @note History: Fri Feb 8 13:07:19 1991, DSJ, Created. */ void AddProtoToProtoPruner(PROTO Proto, int ProtoId, INT_CLASS Class, bool debug) { @@ -461,8 +450,6 @@ uint8_t CircBucketFor(float param, float offset, int num_buckets) { * - FeatureShapes display list for features * - ProtoShapes display list for protos * @return none - * @note Exceptions: none - * @note History: Thu Mar 21 15:40:19 1991, DSJ, Created. */ void UpdateMatchDisplay() { if (IntMatchWindow != nullptr) @@ -481,8 +468,6 @@ void UpdateMatchDisplay() { * @param Class class to add new config to * @return none * @note Globals: none - * @note Exceptions: none - * @note History: Mon Feb 11 14:57:31 1991, DSJ, Created. */ void ConvertConfig(BIT_VECTOR Config, int ConfigId, INT_CLASS Class) { int ProtoId; @@ -510,8 +495,6 @@ namespace tesseract { * @param Class integer class to add converted proto to * @return none * @note Globals: none - * @note Exceptions: none - * @note History: Fri Feb 8 11:22:43 1991, DSJ, Created. */ void Classify::ConvertProto(PROTO Proto, int ProtoId, INT_CLASS Class) { INT_PROTO P; @@ -551,8 +534,6 @@ void Classify::ConvertProto(PROTO Proto, int ProtoId, INT_CLASS Class) { * @param target_unicharset the UNICHARSET to use * @return New set of training templates in integer format. * @note Globals: none - * @note Exceptions: none - * @note History: Thu Feb 7 14:40:42 1991, DSJ, Created. */ INT_TEMPLATES Classify::CreateIntTemplates(CLASSES FloatProtos, const UNICHARSET& @@ -617,8 +598,6 @@ INT_TEMPLATES Classify::CreateIntTemplates(CLASSES FloatProtos, * @param Feature pico-feature to be displayed * @param Evidence best evidence for this feature (0-1) * @return none - * @note Exceptions: none - * @note History: Thu Mar 21 14:45:04 1991, DSJ, Created. */ void DisplayIntFeature(const INT_FEATURE_STRUCT *Feature, float Evidence) { ScrollView::Color color = GetMatchColorFor(Evidence); @@ -638,8 +617,6 @@ void DisplayIntFeature(const INT_FEATURE_STRUCT *Feature, float Evidence) { * @param ProtoId id of proto in Class to be displayed * @param Evidence total evidence for proto (0-1) * @return none - * @note Exceptions: none - * @note History: Thu Mar 21 14:45:04 1991, DSJ, Created. */ void DisplayIntProto(INT_CLASS Class, PROTO_ID ProtoId, float Evidence) { ScrollView::Color color = GetMatchColorFor(Evidence); @@ -658,8 +635,6 @@ void DisplayIntProto(INT_CLASS Class, PROTO_ID ProtoId, float Evidence) { * @param MaxNumConfigs number of configs to allocate space for * @return New class created. * @note Globals: none - * @note Exceptions: none - * @note History: Fri Feb 8 10:51:23 1991, DSJ, Created. */ INT_CLASS NewIntClass(int MaxNumProtos, int MaxNumConfigs) { INT_CLASS Class; @@ -717,8 +692,6 @@ void free_int_class(INT_CLASS int_class) { * initialized to hold 0 classes. * @return The integer templates created. * @note Globals: none - * @note Exceptions: none - * @note History: Fri Feb 8 08:38:51 1991, DSJ, Created. */ INT_TEMPLATES NewIntTemplates() { INT_TEMPLATES T; @@ -755,8 +728,6 @@ namespace tesseract { * @param fp open file to read templates from * @return Pointer to integer templates read from File. * @note Globals: none - * @note Exceptions: none - * @note History: Wed Feb 27 11:48:46 1991, DSJ, Created. */ INT_TEMPLATES Classify::ReadIntTemplates(TFile *fp) { int i, j, w, x, y, z; @@ -1002,8 +973,6 @@ INT_TEMPLATES Classify::ReadIntTemplates(TFile *fp) { * - FeatureShapes display list containing feature matches * - ProtoShapes display list containing proto matches * @return none - * @note Exceptions: none - * @note History: Thu Mar 21 15:47:33 1991, DSJ, Created. */ void Classify::ShowMatchDisplay() { InitIntMatchWindowIfReqd(); @@ -1061,8 +1030,6 @@ void ClearFeatureSpaceWindow(NORM_METHOD norm_method, ScrollView* window) { * @param target_unicharset the UNICHARSET to use * @return none * @note Globals: none - * @note Exceptions: none - * @note History: Wed Feb 27 11:48:46 1991, DSJ, Created. */ void Classify::WriteIntTemplates(FILE *File, INT_TEMPLATES Templates, const UNICHARSET& target_unicharset) { @@ -1139,8 +1106,6 @@ void Classify::WriteIntTemplates(FILE *File, INT_TEMPLATES Templates, * @param NumBuckets total number of buckets * @return Param value corresponding to start position of Bucket. * @note Globals: none - * @note Exceptions: none - * @note History: Thu Feb 14 13:24:33 1991, DSJ, Created. */ float BucketStart(int Bucket, float Offset, int NumBuckets) { return (((float) Bucket / NumBuckets) - Offset); @@ -1157,8 +1122,6 @@ float BucketStart(int Bucket, float Offset, int NumBuckets) { * @param NumBuckets total number of buckets * @return Param value corresponding to end position of Bucket. * @note Globals: none - * @note Exceptions: none - * @note History: Thu Feb 14 13:24:33 1991, DSJ, Created. */ float BucketEnd(int Bucket, float Offset, int NumBuckets) { return (((float) (Bucket + 1) / NumBuckets) - Offset); @@ -1175,8 +1138,6 @@ float BucketEnd(int Bucket, float Offset, int NumBuckets) { * @param WordIndex indicates which word to change * @return none * @note Globals: none - * @note Exceptions: none - * @note History: Tue Feb 19 11:11:29 1991, DSJ, Created. */ void DoFill(FILL_SPEC *FillSpec, CLASS_PRUNER_STRUCT* Pruner, @@ -1217,8 +1178,6 @@ void DoFill(FILL_SPEC *FillSpec, * @param Filler table filler to check if done * @return TRUE if no more lines to fill, FALSE otherwise. * @note Globals: none - * @note Exceptions: none - * @note History: Tue Feb 19 10:08:05 1991, DSJ, Created. */ bool FillerDone(TABLE_FILLER* Filler) { FILL_SWITCH *Next; @@ -1243,8 +1202,6 @@ bool FillerDone(TABLE_FILLER* Filler) { * @param debug debug flag * @return none * @note Globals: none - * @note Exceptions: none - * @note History: Tue Oct 16 09:26:54 1990, DSJ, Created. */ void FillPPCircularBits(uint32_t ParamTable[NUM_PP_BUCKETS][WERDS_PER_PP_VECTOR], int Bit, float Center, float Spread, bool debug) { @@ -1286,8 +1243,6 @@ void FillPPCircularBits(uint32_t ParamTable[NUM_PP_BUCKETS][WERDS_PER_PP_VECTOR] * @param debug debug flag * @return none * @note Globals: none - * @note Exceptions: none - * @note History: Tue Oct 16 09:26:54 1990, DSJ, Created. */ void FillPPLinearBits(uint32_t ParamTable[NUM_PP_BUCKETS][WERDS_PER_PP_VECTOR], int Bit, float Center, float Spread, bool debug) { @@ -1320,8 +1275,6 @@ namespace tesseract { * @param shape_id * @return Character entered in the debug window. * @note Globals: none - * @note Exceptions: none - * @note History: Thu Mar 21 16:55:13 1991, DSJ, Created. */ CLASS_ID Classify::GetClassToDebug(const char *Prompt, bool* adaptive_on, bool* pretrained_on, int* shape_id) { @@ -1400,8 +1353,6 @@ CLASS_ID Classify::GetClassToDebug(const char *Prompt, bool* adaptive_on, * @param AnglePad place to put angle pad for Level * @return none (results are returned in EndPad, SidePad, and AnglePad. * @note Globals: none - * @note Exceptions: none - * @note History: Thu Feb 14 08:26:49 1991, DSJ, Created. */ void GetCPPadsForLevel(int Level, float *EndPad, @@ -1441,8 +1392,6 @@ void GetCPPadsForLevel(int Level, * @param Evidence evidence value to return color for * @return Color which corresponds to specified Evidence value. * @note Globals: none - * @note Exceptions: none - * @note History: Thu Mar 21 15:24:52 1991, DSJ, Created. */ ScrollView::Color GetMatchColorFor(float Evidence) { assert (Evidence >= 0.0); @@ -1467,8 +1416,6 @@ ScrollView::Color GetMatchColorFor(float Evidence) { * @param Fill place to put spec for next fill * @return none (results are returned in Fill) * @note Globals: none - * @note Exceptions: none - * @note History: Tue Feb 19 10:17:42 1991, DSJ, Created. */ void GetNextFill(TABLE_FILLER *Filler, FILL_SPEC *Fill) { FILL_SWITCH *Next; @@ -1519,8 +1466,6 @@ void GetNextFill(TABLE_FILLER *Filler, FILL_SPEC *Fill) { * * @return none (results are returned in Filler) * @note Globals: none - * @note Exceptions: none - * @note History: Thu Feb 14 09:27:05 1991, DSJ, Created. */ void InitTableFiller (float EndPad, float SidePad, float AnglePad, PROTO Proto, TABLE_FILLER * Filler) @@ -1684,8 +1629,6 @@ void InitTableFiller (float EndPad, float SidePad, * @param color color to use for feature rendering * @return New shape list with rendering of Feature added. * @note Globals: none - * @note Exceptions: none - * @note History: Thu Mar 21 14:57:41 1991, DSJ, Created. */ void RenderIntFeature(ScrollView *window, const INT_FEATURE_STRUCT* Feature, ScrollView::Color color) { @@ -1720,8 +1663,6 @@ void RenderIntFeature(ScrollView *window, const INT_FEATURE_STRUCT* Feature, * Globals: none * * @return New shape list with a rendering of one proto added. - * @note Exceptions: none - * @note History: Thu Mar 21 10:21:09 1991, DSJ, Created. */ void RenderIntProto(ScrollView *window, INT_CLASS Class, @@ -1787,8 +1728,6 @@ void RenderIntProto(ScrollView *window, * Globals: none * * @return Truncated parameter. - * @note Exceptions: none - * @note History: Fri Feb 8 11:54:28 1991, DSJ, Created. */ int TruncateParam(float Param, int Min, int Max, char *Id) { if (Param < Min) { diff --git a/src/classify/kdtree.cpp b/src/classify/kdtree.cpp index cac243da2c..b038006011 100644 --- a/src/classify/kdtree.cpp +++ b/src/classify/kdtree.cpp @@ -209,10 +209,6 @@ KDTREE *MakeKDTree(int16_t KeySize, const PARAM_DESC KeyDesc[]) { * @param Tree K-D tree in which data is to be stored * @param Key ptr to key by which data can be retrieved * @param Data ptr to data to be stored in the tree - * - * @note Exceptions: none - * @note History: 3/10/89, DSJ, Created. - * 7/13/89, DSJ, Changed return to void. */ void KDStore(KDTREE *Tree, float *Key, void *Data) { int Level; @@ -253,11 +249,6 @@ void KDStore(KDTREE *Tree, float *Key, void *Data) { * @param Tree K-D tree to delete node from * @param Key key of node to be deleted * @param Data data contents of node to be deleted - * - * @note Exceptions: none - * - * @note History: 3/13/89, DSJ, Created. - * 7/13/89, DSJ, Specify node indirectly by key and data. */ void KDDelete (KDTREE * Tree, float Key[], void *Data) { @@ -311,10 +302,6 @@ KDDelete (KDTREE * Tree, float Key[], void *Data) { * @param DBuffer ptr to QuerySize buffer to hold distances * from nearest neighbor to query point * @param NumberOfResults [out] Number of nearest neighbors actually found - * @note Exceptions: none - * @note History: - * - 3/10/89, DSJ, Created. - * - 7/13/89, DSJ, Return contents of node instead of node itself. */ void KDNearestNeighborSearch( KDTREE *Tree, float Query[], int QuerySize, float MaxDistance, @@ -342,8 +329,6 @@ void KDWalk(KDTREE *Tree, void_proc action, void *context) { * untouched. * @param Tree tree data structure to be released * @return none - * @note Exceptions: none - * @note History: 5/26/89, DSJ, Created. */ void FreeKDTree(KDTREE *Tree) { FreeSubTree(Tree->Root.Left); @@ -365,8 +350,6 @@ void FreeKDTree(KDTREE *Tree) { * @param Data ptr to data to be stored in new node * @param Index index of Key to branch on * @return pointer to new K-D tree node - * @note Exceptions: None - * @note History: 3/11/89, DSJ, Created. */ KDNODE *MakeKDNode(KDTREE *tree, float Key[], void *Data, int Index) { KDNODE *NewNode; diff --git a/src/classify/mf.cpp b/src/classify/mf.cpp index 51e46ce317..106b5e0af3 100644 --- a/src/classify/mf.cpp +++ b/src/classify/mf.cpp @@ -39,8 +39,6 @@ * @param Blob blob to extract micro-features from * @param cn_denorm control parameter to feature extractor. * @return Micro-features for Blob. - * @note Exceptions: none - * @note History: Wed May 23 18:06:38 1990, DSJ, Created. */ FEATURE_SET ExtractMicros(TBLOB* Blob, const DENORM& cn_denorm) { int NumFeatures; diff --git a/src/classify/mfdefs.cpp b/src/classify/mfdefs.cpp index 34478a57a2..8ca9be68b3 100644 --- a/src/classify/mfdefs.cpp +++ b/src/classify/mfdefs.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - ** Filename: mfdefs.c + ** Filename: mfdefs.cpp ** Purpose: Basic routines for manipulating micro-features ** Author: Dan Johnson ** History: Mon Jan 22 08:48:58 1990, DSJ, Created. @@ -30,7 +30,6 @@ * This routine allocates and returns a new micro-feature * data structure. * @return New MICROFEATURE - * @note History: 7/27/89, DSJ, Created. */ MICROFEATURE NewMicroFeature() { return ((MICROFEATURE) Emalloc (sizeof (MFBLOCK))); @@ -43,7 +42,6 @@ MICROFEATURE NewMicroFeature() { * a list of micro-features. * @param MicroFeatures list of micro-features to be freed * @return none - * @note History: 7/27/89, DSJ, Created. */ void FreeMicroFeatures(MICROFEATURES MicroFeatures) { destroy_nodes(MicroFeatures, Efree); diff --git a/src/classify/mfoutline.cpp b/src/classify/mfoutline.cpp index 1e046c0384..d848519cce 100644 --- a/src/classify/mfoutline.cpp +++ b/src/classify/mfoutline.cpp @@ -114,8 +114,6 @@ LIST ConvertOutlines(TESSLINE *outline, * @param MinSlope controls "snapping" of segments to horizontal * @param MaxSlope controls "snapping" of segments to vertical * @return none - * @note Exceptions: none - * @note History: 7/21/89, DSJ, Created. */ void FindDirectionChanges(MFOUTLINE Outline, float MinSlope, @@ -148,8 +146,6 @@ void FindDirectionChanges(MFOUTLINE Outline, * a micro-feature outline. * @param arg micro-feature outline to be freed * @return none - * @note Exceptions: none - * @note History: 7/27/89, DSJ, Created. */ void FreeMFOutline(void *arg) { //MFOUTLINE Outline) MFOUTLINE Start; @@ -172,8 +168,6 @@ void FreeMFOutline(void *arg) { //MFOUTLINE Outline * of outlines. * @param Outlines list of mf-outlines to be freed * @return none - * @note Exceptions: none - * @note History: Thu Dec 13 16:14:50 1990, DSJ, Created. */ void FreeOutlines(LIST Outlines) { destroy_nodes(Outlines, FreeMFOutline); @@ -192,8 +186,6 @@ void FreeOutlines(LIST Outlines) { * @param Outline micro-feature outline to analyze * @return none * @note Globals: none - * @note Exceptions: none - * @note History: 6/29/90, DSJ, Created. */ void MarkDirectionChanges(MFOUTLINE Outline) { MFOUTLINE Current; @@ -231,8 +223,6 @@ MFEDGEPT *NewEdgePoint() { * @param EdgePoint start search from this point * @return Next extremity in the outline after EdgePoint. * @note Globals: none - * @note Exceptions: none - * @note History: 7/26/89, DSJ, Created. */ MFOUTLINE NextExtremity(MFOUTLINE EdgePoint) { EdgePoint = NextPointAfter(EdgePoint); @@ -257,8 +247,6 @@ MFOUTLINE NextExtremity(MFOUTLINE EdgePoint) { * @param XOrigin x-origin of text * @return none * @note Globals: none - * @note Exceptions: none - * @note History: 8/2/89, DSJ, Created. */ void NormalizeOutline(MFOUTLINE Outline, float XOrigin) { @@ -293,8 +281,6 @@ namespace tesseract { * @param XScale x-direction scale factor used by routine * @param YScale y-direction scale factor used by routine * @return none (Outlines are changed and XScale and YScale are updated) - * @note Exceptions: none - * @note History: Fri Dec 14 08:14:55 1990, DSJ, Created. */ void Classify::NormalizeOutlines(LIST Outlines, float *XScale, @@ -330,8 +316,6 @@ void Classify::NormalizeOutlines(LIST Outlines, * @param Direction new direction to assign to segment * @return none * @note Globals: none - * @note Exceptions: none - * @note History: Fri May 4 10:42:04 1990, DSJ, Created. */ void ChangeDirection(MFOUTLINE Start, MFOUTLINE End, DIRECTION Direction) { MFOUTLINE Current; @@ -351,8 +335,6 @@ void ChangeDirection(MFOUTLINE Start, MFOUTLINE End, DIRECTION Direction) { * @param cn_denorm * @return none * @note Globals: none - * @note Exceptions: none - * @note History: Fri Dec 14 10:27:11 1990, DSJ, Created. */ void CharNormalizeOutline(MFOUTLINE Outline, const DENORM& cn_denorm) { MFOUTLINE First, Current; @@ -392,8 +374,6 @@ void CharNormalizeOutline(MFOUTLINE Outline, const DENORM& cn_denorm) { * @param MaxSlope slope above which lines are vertical * @return none * @note Globals: none - * @note Exceptions: none - * @note History: 7/25/89, DSJ, Created. */ void ComputeDirection(MFEDGEPT *Start, MFEDGEPT *Finish, @@ -457,8 +437,6 @@ void ComputeDirection(MFEDGEPT *Start, * @param EdgePoint start search from this point * @return Point of next direction change in micro-feature outline. * @note Globals: none - * @note Exceptions: none - * @note History: 7/25/89, DSJ, Created. */ MFOUTLINE NextDirectionChange(MFOUTLINE EdgePoint) { DIRECTION InitialDirection; diff --git a/src/classify/mfx.cpp b/src/classify/mfx.cpp index fbcea8a1b1..50fd08c86b 100644 --- a/src/classify/mfx.cpp +++ b/src/classify/mfx.cpp @@ -65,8 +65,6 @@ MICROFEATURE ExtractMicroFeature(MFOUTLINE Start, MFOUTLINE End); * @param Blob blob to extract micro-features from * @param cn_denorm control parameter to feature extractor * @return List of micro-features extracted from the blob. - * @note Exceptions: none - * @note History: 7/21/89, DSJ, Created. */ MICROFEATURES BlobMicroFeatures(TBLOB* Blob, const DENORM& cn_denorm) { MICROFEATURES MicroFeatures = NIL_LIST; @@ -113,8 +111,6 @@ MICROFEATURES BlobMicroFeatures(TBLOB* Blob, const DENORM& cn_denorm) { * @param End ending edge point of micro-feature * @note Globals: none * @return Orientation parameter for the specified micro-feature. - * @note Exceptions: none - * @note History: 7/27/89, DSJ, Created. */ float ComputeOrientation(MFEDGEPT *Start, MFEDGEPT *End) { float Orientation = NormalizeAngle(AngleFrom(Start->Point, End->Point)); @@ -131,8 +127,6 @@ float ComputeOrientation(MFEDGEPT *Start, MFEDGEPT *End) { * @param MicroFeatures list of micro-features to add to * @return List of micro-features with new features added to front. * @note Globals: none - * @note Exceptions: none - * @note History: 7/26/89, DSJ, Created. */ MICROFEATURES ConvertToMicroFeatures(MFOUTLINE Outline, MICROFEATURES MicroFeatures) { @@ -172,10 +166,6 @@ MICROFEATURES ConvertToMicroFeatures(MFOUTLINE Outline, * @param End ending point of micro-feature * @return New micro-feature or nullptr if the feature was rejected. * @note Globals: none - * @note Exceptions: none - * @note History: - * - 7/26/89, DSJ, Created. - * - 11/17/89, DSJ, Added handling for Start and End same point. */ MICROFEATURE ExtractMicroFeature(MFOUTLINE Start, MFOUTLINE End) { MICROFEATURE NewFeature; diff --git a/src/classify/normmatch.cpp b/src/classify/normmatch.cpp index 729a3674a8..311bf794ac 100644 --- a/src/classify/normmatch.cpp +++ b/src/classify/normmatch.cpp @@ -79,8 +79,6 @@ namespace tesseract { * #NormProtos character normalization prototypes * * @return Best match rating for Feature against protos of ClassId. - * @note Exceptions: none - * @note History: Wed Dec 19 16:56:12 1990, DSJ, Created. */ float Classify::ComputeNormMatch(CLASS_ID ClassId, const FEATURE_STRUCT& feature, @@ -200,8 +198,6 @@ double NormEvidenceOf(double NormAdj) { * @param Feature[] array of feature parameters * Globals: none * @return none - * @note Exceptions: none - * @note History: Wed Jan 2 09:49:35 1991, DSJ, Created. */ void PrintNormMatch(FILE *File, int NumParams, @@ -235,8 +231,6 @@ namespace tesseract { * @param fp open text file to read normalization protos from * Globals: none * @return Character normalization protos. - * @note Exceptions: none - * @note History: Wed Dec 19 16:38:49 1990, DSJ, Created. */ NORM_PROTOS *Classify::ReadNormProtos(TFile *fp) { NORM_PROTOS *NormProtos; diff --git a/src/classify/ocrfeatures.cpp b/src/classify/ocrfeatures.cpp index ecb660a752..a8e75d06df 100644 --- a/src/classify/ocrfeatures.cpp +++ b/src/classify/ocrfeatures.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - ** Filename: features.c + ** Filename: ocrfeatures.cpp ** Purpose: Generic definition of a feature. ** Author: Dan Johnson ** History: Mon May 21 10:49:04 1990, DSJ, Created. @@ -37,7 +37,6 @@ * @param FeatureSet set of features to add Feature to * @param Feature feature to be added to FeatureSet * @return TRUE if feature added to set, FALSE if set is already full. - * @note History: Tue May 22 17:22:23 1990, DSJ, Created. */ bool AddFeature(FEATURE_SET FeatureSet, FEATURE Feature) { if (FeatureSet->NumFeatures >= FeatureSet->MaxNumFeatures) { @@ -53,7 +52,6 @@ bool AddFeature(FEATURE_SET FeatureSet, FEATURE Feature) { * Release the memory consumed by the specified feature. * @param Feature feature to be deallocated. * @return none - * @note History: Mon May 21 13:33:27 1990, DSJ, Created. */ void FreeFeature(FEATURE Feature) { free(Feature); } /* FreeFeature */ @@ -63,7 +61,6 @@ void FreeFeature(FEATURE Feature) { free(Feature); } /* FreeFeature */ * features contained in the set. * @param FeatureSet set of features to be freed * @return none - * @note History: Mon May 21 13:59:46 1990, DSJ, Created. */ void FreeFeatureSet(FEATURE_SET FeatureSet) { int i; @@ -80,7 +77,6 @@ void FreeFeatureSet(FEATURE_SET FeatureSet) { * type. * @param FeatureDesc description of feature to be created. * @return New #FEATURE. - * @note History: Mon May 21 14:06:42 1990, DSJ, Created. */ FEATURE NewFeature(const FEATURE_DESC_STRUCT* FeatureDesc) { FEATURE Feature; @@ -97,7 +93,6 @@ FEATURE NewFeature(const FEATURE_DESC_STRUCT* FeatureDesc) { * hold the specified number of features. * @param NumFeatures maximum # of features to be put in feature set * @return New #FEATURE_SET. - * @note History: Mon May 21 14:22:40 1990, DSJ, Created. */ FEATURE_SET NewFeatureSet(int NumFeatures) { FEATURE_SET FeatureSet; @@ -167,7 +162,6 @@ FEATURE_SET ReadFeatureSet(FILE* File, const FEATURE_DESC_STRUCT* FeatureDesc) { * @param Feature feature to write out to str * @param str string to write Feature to * @return none - * @note History: Wed May 23 09:28:18 1990, DSJ, Created. */ void WriteFeature(FEATURE Feature, STRING* str) { for (int i = 0; i < Feature->Type->NumParams; i++) { @@ -187,7 +181,6 @@ void WriteFeature(FEATURE Feature, STRING* str) { * @param FeatureSet feature set to write to File * @param str string to write Feature to * @return none - * @note History: Wed May 23 10:06:03 1990, DSJ, Created. */ void WriteFeatureSet(FEATURE_SET FeatureSet, STRING* str) { if (FeatureSet) { @@ -212,7 +205,6 @@ void WriteFeatureSet(FEATURE_SET FeatureSet, STRING* str) { * @param File open text file to write FeatureDesc to * @param FeatureDesc feature descriptor to write to File * @return none - * @note History: Fri May 25 15:27:18 1990, DSJ, Created. */ void WriteOldParamDesc(FILE* File, const FEATURE_DESC_STRUCT* FeatureDesc) { int i; diff --git a/src/classify/outfeat.cpp b/src/classify/outfeat.cpp index 261b06fb00..119e7ba202 100644 --- a/src/classify/outfeat.cpp +++ b/src/classify/outfeat.cpp @@ -38,10 +38,6 @@ namespace tesseract { * @param Blob blob to extract pico-features from * @return Outline-features for Blob. * @note Globals: none - * @note Exceptions: none - * @note History: - * - 11/13/90, DSJ, Created. - * - 05/24/91, DSJ, Updated for either char or baseline normalize. */ FEATURE_SET Classify::ExtractOutlineFeatures(TBLOB *Blob) { LIST Outlines; @@ -86,8 +82,6 @@ FEATURE_SET Classify::ExtractOutlineFeatures(TBLOB *Blob) { * @param FeatureSet set to add outline-feature to * @return none (results are placed in FeatureSet) * @note Globals: none - * @note Exceptions: none - * @note History: 11/13/90, DSJ, Created. */ void AddOutlineFeatureToSet(FPOINT *Start, FPOINT *End, @@ -113,10 +107,6 @@ void AddOutlineFeatureToSet(FPOINT *Start, * @param FeatureSet set of features to add outline-features to * @return none (results are returned in FeatureSet) * @note Globals: none - * @note Exceptions: none - * @note History: - * - 11/13/90, DSJ, Created. - * - 5/24/91, DSJ, Added hidden edge capability. */ void ConvertToOutlineFeatures(MFOUTLINE Outline, FEATURE_SET FeatureSet) { MFOUTLINE Next; @@ -156,8 +146,6 @@ void ConvertToOutlineFeatures(MFOUTLINE Outline, FEATURE_SET FeatureSet) { * @param FeatureSet outline-features to be normalized * @return none (FeatureSet is changed) * @note Globals: none - * @note Exceptions: none - * @note History: 11/13/90, DSJ, Created. */ void NormalizeOutlineX(FEATURE_SET FeatureSet) { int i; diff --git a/src/classify/picofeat.cpp b/src/classify/picofeat.cpp index 5445fd6ffd..60e0a68156 100644 --- a/src/classify/picofeat.cpp +++ b/src/classify/picofeat.cpp @@ -60,8 +60,6 @@ namespace tesseract { * - classify_norm_method normalization method currently specified * @param Blob blob to extract pico-features from * @return Pico-features for Blob. - * @note Exceptions: none - * @note History: 9/4/90, DSJ, Created. */ FEATURE_SET Classify::ExtractPicoFeatures(TBLOB *Blob) { LIST Outlines; @@ -102,8 +100,6 @@ FEATURE_SET Classify::ExtractPicoFeatures(TBLOB *Blob) { * @param End ending point of pico-feature * @param FeatureSet set to add pico-feature to * @return none (results are placed in FeatureSet) - * @note Exceptions: none - * @note History: Tue Apr 30 15:44:34 1991, DSJ, Created. */ void ConvertSegmentToPicoFeat(FPOINT *Start, FPOINT *End, @@ -156,8 +152,6 @@ void ConvertSegmentToPicoFeat(FPOINT *Start, * @param Outline outline to extract micro-features from * @param FeatureSet set of features to add pico-features to * @return none (results are returned in FeatureSet) - * @note Exceptions: none - * @note History: 4/30/91, DSJ, Adapted from ConvertToPicoFeatures(). */ void ConvertToPicoFeatures2(MFOUTLINE Outline, FEATURE_SET FeatureSet) { MFOUTLINE Next; @@ -197,8 +191,6 @@ void ConvertToPicoFeatures2(MFOUTLINE Outline, FEATURE_SET FeatureSet) { * @param FeatureSet pico-features to be normalized * @return none (FeatureSet is changed) * @note Globals: none - * @note Exceptions: none - * @note History: Tue Sep 4 16:50:08 1990, DSJ, Created. */ void NormalizePicoX(FEATURE_SET FeatureSet) { int i; @@ -223,8 +215,6 @@ namespace tesseract { * @param blob blob to extract features from * @param fx_info * @return Integer character-normalized features for blob. - * @note Exceptions: none - * @note History: 8/8/2011, rays, Created. */ FEATURE_SET Classify::ExtractIntCNFeatures( const TBLOB& blob, const INT_FX_RESULT_STRUCT& fx_info) { @@ -255,8 +245,6 @@ FEATURE_SET Classify::ExtractIntCNFeatures( * @param blob blob to extract features from * @param fx_info * @return Geometric (top/bottom/width) features for blob. - * @note Exceptions: none - * @note History: 8/8/2011, rays, Created. */ FEATURE_SET Classify::ExtractIntGeoFeatures( const TBLOB& blob, const INT_FX_RESULT_STRUCT& fx_info) { diff --git a/src/cutil/bitvec.cpp b/src/cutil/bitvec.cpp index 6cc091f0b7..a656bf95bc 100644 --- a/src/cutil/bitvec.cpp +++ b/src/cutil/bitvec.cpp @@ -41,8 +41,6 @@ * @param NewNumBits new size of bit vector * * @return New expanded bit vector. - * @note Exceptions: none - * @note History: Fri Nov 16 10:11:16 1990, DSJ, Created. */ BIT_VECTOR ExpandBitVector(BIT_VECTOR Vector, int NewNumBits) { return ((BIT_VECTOR) Erealloc(Vector, @@ -63,8 +61,6 @@ void FreeBitVector(BIT_VECTOR BitVector) { * * @param BitVector bit vector to be freed * - * @note Exceptions: none - * @note History: Tue Oct 23 16:46:09 1990, DSJ, Created. */ if (BitVector) { Efree(BitVector); @@ -83,8 +79,6 @@ void FreeBitVector(BIT_VECTOR BitVector) { * @param NumBits number of bits in new bit vector * * @return New bit vector. - * @note Exceptions: none - * @note History: Tue Oct 23 16:51:27 1990, DSJ, Created. */ BIT_VECTOR NewBitVector(int NumBits) { return ((BIT_VECTOR) Emalloc(sizeof(uint32_t) * diff --git a/src/training/cntraining.cpp b/src/training/cntraining.cpp index 1945b5a17c..ea87349d9a 100644 --- a/src/training/cntraining.cpp +++ b/src/training/cntraining.cpp @@ -109,8 +109,6 @@ CLUSTERCONFIG CNConfig = * @param argv array of command line arguments * @return none * @note Globals: none -* @note Exceptions: none -* @note History: Fri Aug 18 08:56:17 1989, DSJ, Created. */ int main(int argc, char *argv[]) { tesseract::CheckSharedLibraryVersion(); @@ -204,8 +202,6 @@ int main(int argc, char *argv[]) { * @param LabeledProtoList List of labeled protos * @param feature_desc Description of the features * @return none -* @note Exceptions: none -* @note History: Fri Aug 18 16:17:06 1989, DSJ, Created. */ static void WriteNormProtos(const char *Directory, LIST LabeledProtoList, const FEATURE_DESC_STRUCT *feature_desc) { diff --git a/src/training/commontraining.cpp b/src/training/commontraining.cpp index f6bb7e0e55..cb60a6b083 100644 --- a/src/training/commontraining.cpp +++ b/src/training/commontraining.cpp @@ -79,7 +79,6 @@ DOUBLE_PARAM_FLAG(clusterconfig_confidence, Config.Confidence, * @param argc number of command line arguments to parse * @param argv command line arguments * @return none - * @note Exceptions: Illegal options terminate the program. */ void ParseArguments(int* argc, char ***argv) { STRING usage; @@ -280,8 +279,6 @@ MasterTrainer* LoadTrainingData(int argc, const char* const * argv, * Globals: * - tessoptind defined by tessopt sys call * @return Next command line argument or nullptr. - * @note Exceptions: none - * @note History: Fri Aug 18 09:34:12 1989, DSJ, Created. */ const char *GetNextFilename(int argc, const char* const * argv) { if (tessoptind < argc) @@ -299,8 +296,6 @@ const char *GetNextFilename(int argc, const char* const * argv) { * @param Label label to search for * @return Labeled list with the specified label or nullptr. * @note Globals: none - * @note Exceptions: none - * @note History: Fri Aug 18 15:57:41 1989, DSJ, Created. */ LABELEDLIST FindList(LIST List, char* Label) { LABELEDLIST LabeledList; @@ -322,8 +317,6 @@ LABELEDLIST FindList(LIST List, char* Label) { * @param Label label for new list * @return New, empty labeled list. * @note Globals: none - * @note Exceptions: none - * @note History: Fri Aug 18 16:08:46 1989, DSJ, Created. */ LABELEDLIST NewLabeledList(const char* Label) { LABELEDLIST LabeledList; @@ -354,11 +347,6 @@ LABELEDLIST NewLabeledList(const char* Label) { * @param training_samples * @return none * @note Globals: none - * @note Exceptions: none - * @note History: - * - Fri Aug 18 13:11:39 1989, DSJ, Created. - * - Tue May 17 1998 simplifications to structure, illiminated - * font, and feature specification levels of structure. */ void ReadTrainingSamples(const FEATURE_DEFS_STRUCT& feature_defs, const char *feature_name, int max_samples, @@ -421,8 +409,6 @@ void ReadTrainingSamples(const FEATURE_DEFS_STRUCT& feature_defs, * @param CharList list of all fonts in document * @return none * @note Globals: none - * @note Exceptions: none - * @note History: Fri Aug 18 17:44:27 1989, DSJ, Created. */ void FreeTrainingSamples(LIST CharList) { LABELEDLIST char_sample; @@ -450,8 +436,6 @@ void FreeTrainingSamples(LIST CharList) { * @param LabeledList labeled list to be freed * @note Globals: none * @return none - * @note Exceptions: none - * @note History: Fri Aug 18 17:52:45 1989, DSJ, Created. */ void FreeLabeledList(LABELEDLIST LabeledList) { destroy(LabeledList->List); @@ -470,8 +454,6 @@ void FreeLabeledList(LABELEDLIST LabeledList) { * given character. * @return Pointer to new clusterer data structure. * @note Globals: None - * @note Exceptions: None - * @note History: 8/16/89, DSJ, Created. */ CLUSTERER *SetUpForClustering(const FEATURE_DEFS_STRUCT &FeatureDefs, LABELEDLIST char_sample, @@ -687,8 +669,6 @@ MERGE_CLASS NewLabeledClass(const char* Label) { * @param ClassList list of all fonts in document * @return none * @note Globals: none - * @note Exceptions: none - * @note History: Fri Aug 18 17:44:27 1989, DSJ, Created. */ void FreeLabeledClassList(LIST ClassList) { MERGE_CLASS MergeClass; diff --git a/src/training/mergenf.cpp b/src/training/mergenf.cpp index d5dfde4972..029f029c62 100644 --- a/src/training/mergenf.cpp +++ b/src/training/mergenf.cpp @@ -121,8 +121,6 @@ float CompareProtos(PROTO p1, PROTO p2) { * Globals: none * * @return none (results are returned in MergedProto) - * @note Exceptions: none - * @note History: Mon Nov 26 08:15:08 1990, DSJ, Created. */ void ComputeMergedProto (PROTO p1, PROTO p2, @@ -155,8 +153,6 @@ void ComputeMergedProto (PROTO p1, * Globals: none * * @return Id of closest proto in Class or NO_PROTO. - * @note Exceptions: none - * @note History: Sat Nov 24 11:42:58 1990, DSJ, Created. */ int FindClosestExistingProto(CLASS_TYPE Class, int NumMerged[], PROTOTYPE *Prototype) { @@ -195,9 +191,6 @@ int FindClosestExistingProto(CLASS_TYPE Class, int NumMerged[], * @param Old old proto to be converted * * Globals: none - * - * Exceptions: none - * History: Mon Nov 26 09:45:39 1990, DSJ, Created. */ void MakeNewFromOld(PROTO New, PROTOTYPE *Old) { New->X = CenterX(Old->Mean); @@ -264,7 +257,6 @@ double EvidenceOf (double Similarity) { * - training_orthogonal_bbox_pad bounding box pad orthogonal to proto * * @return true if feature could match Proto. - * @note Exceptions: none */ bool DummyFastMatch(FEATURE Feature, PROTO Proto) { @@ -327,7 +319,6 @@ void ComputePaddedBoundingBox (PROTO Proto, float TangentPad, * Globals: none * * @return true if point (X,Y) is inside of Rectangle. - * @note Exceptions: none */ bool PointInside(FRECT *Rectangle, float X, float Y) { return (X >= Rectangle->MinX) && diff --git a/src/training/mftraining.cpp b/src/training/mftraining.cpp index 1f6676d628..56b513738c 100644 --- a/src/training/mftraining.cpp +++ b/src/training/mftraining.cpp @@ -208,10 +208,7 @@ static void SetupConfigMap(ShapeTable* shape_table, IndexMapBiDi* config_map) { * the OCR engine. * @param argc number of command line arguments * @param argv array of command line arguments - * @return none - * @note Exceptions: none - * @note History: Fri Aug 18 08:56:17 1989, DSJ, Created. - * @note History: Mon May 18 1998, Christy Russson, Revistion started. + * @return 0 if no error occurred */ int main (int argc, char **argv) { tesseract::CheckSharedLibraryVersion();