亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cluster.cpp

?? 一OCR的相關資料。.希望對研究OCR的朋友有所幫助.
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
      left subcluster.  This continues until a leaf is found.      If all samples have been found, NULL is returned.      InitSampleSearch() must be called      before NextSample() to initialize the search.Return:		Pointer to the next leaf cluster (sample) or NULL.Exceptions:	NoneHistory:	6/16/89, DSJ, Created.****************************************************************************/CLUSTER *NextSample(LIST *SearchState) {  CLUSTER *Cluster;  if (*SearchState == NIL)    return (NULL);  Cluster = (CLUSTER *) first (*SearchState);  *SearchState = pop (*SearchState);  while (TRUE) {    if (Cluster->Left == NULL)      return (Cluster);    *SearchState = push (*SearchState, Cluster->Right);    Cluster = Cluster->Left;  }}                                // NextSample/** Mean ***********************************************************Parameters:	Proto		prototype to return mean of      Dimension	dimension whose mean is to be returnedGlobals:	noneOperation:	This routine returns the mean of the specified      prototype in the indicated dimension.Return:		Mean of Prototype in DimensionExceptions: noneHistory:	7/6/89, DSJ, Created.*********************************************************************/FLOAT32 Mean(PROTOTYPE *Proto, UINT16 Dimension) {  return (Proto->Mean[Dimension]);}                                // Mean/** StandardDeviation *************************************************Parameters:	Proto		prototype to return standard deviation of      Dimension	dimension whose stddev is to be returnedGlobals:	noneOperation:	This routine returns the standard deviation of the      prototype in the indicated dimension.Return:		Standard deviation of Prototype in DimensionExceptions: noneHistory:	7/6/89, DSJ, Created.**********************************************************************/FLOAT32 StandardDeviation(PROTOTYPE *Proto, UINT16 Dimension) {  switch (Proto->Style) {    case spherical:      return ((FLOAT32) sqrt ((double) Proto->Variance.Spherical));    case elliptical:      return ((FLOAT32)        sqrt ((double) Proto->Variance.Elliptical[Dimension]));    case mixed:      switch (Proto->Distrib[Dimension]) {        case normal:          return ((FLOAT32)            sqrt ((double) Proto->Variance.Elliptical[Dimension]));        case uniform:        case D_random:          return (Proto->Variance.Elliptical[Dimension]);      }  }  return 0.0f;}                                // StandardDeviation/*---------------------------------------------------------------------------            Private Code----------------------------------------------------------------------------*//** CreateClusterTree *******************************************************Parameters:	Clusterer	data structure holdings samples to be clusteredGlobals:	Tree		kd-tree holding samples      TempCluster	array of temporary clusters      CurrentTemp	index of next temp cluster to be used      Heap		heap used to hold temp clusters - "best" on topOperation:	This routine performs a bottoms-up clustering on the samples      held in the kd-tree of the Clusterer data structure.  The      result is a cluster tree.  Each node in the tree represents      a cluster which conceptually contains a subset of the samples.      More precisely, the cluster contains all of the samples which      are contained in its two sub-clusters.  The leaves of the      tree are the individual samples themselves; they have no      sub-clusters.  The root node of the tree conceptually contains      all of the samples.Return:		None (the Clusterer data structure is changed)Exceptions:	NoneHistory:	5/29/89, DSJ, Created.******************************************************************************/void CreateClusterTree(CLUSTERER *Clusterer) {  HEAPENTRY HeapEntry;  TEMPCLUSTER *PotentialCluster;  // save the kd-tree in a global variable so kd-tree walker can get at it  Tree = Clusterer->KDTree;  // allocate memory to to hold all of the "potential" clusters  TempCluster = (TEMPCLUSTER *)    Emalloc (Clusterer->NumberOfSamples * sizeof (TEMPCLUSTER));  CurrentTemp = 0;  // each sample and its nearest neighbor form a "potential" cluster  // save these in a heap with the "best" potential clusters on top  Heap = MakeHeap (Clusterer->NumberOfSamples);  KDWalk (Tree, (void_proc) MakePotentialClusters);  // form potential clusters into actual clusters - always do "best" first  while (GetTopOfHeap (Heap, &HeapEntry) != EMPTY) {    PotentialCluster = (TEMPCLUSTER *) (HeapEntry.Data);    // if main cluster of potential cluster is already in another cluster    // then we don't need to worry about it    if (PotentialCluster->Cluster->Clustered) {      continue;    }    // if main cluster is not yet clustered, but its nearest neighbor is    // then we must find a new nearest neighbor    else if (PotentialCluster->Neighbor->Clustered) {      PotentialCluster->Neighbor =        FindNearestNeighbor (Tree, PotentialCluster->Cluster,        &(HeapEntry.Key));      if (PotentialCluster->Neighbor != NULL) {        HeapStore(Heap, &HeapEntry);      }    }    // if neither cluster is already clustered, form permanent cluster    else {      PotentialCluster->Cluster =        MakeNewCluster(Clusterer, PotentialCluster);      PotentialCluster->Neighbor =        FindNearestNeighbor (Tree, PotentialCluster->Cluster,        &(HeapEntry.Key));      if (PotentialCluster->Neighbor != NULL) {        HeapStore(Heap, &HeapEntry);      }    }  }  // the root node in the cluster tree is now the only node in the kd-tree  Clusterer->Root = (CLUSTER *) RootOf (Clusterer->KDTree);  // free up the memory used by the K-D tree, heap, and temp clusters  FreeKDTree(Tree);  Clusterer->KDTree = NULL;  FreeHeap(Heap);  memfree(TempCluster);}                                // CreateClusterTree/** MakePotentialClusters **************************************************Parameters:	Cluster	current cluster being visited in kd-tree walk      Order	order in which cluster is being visited      Level	level of this cluster in the kd-treeGlobals:	Tree		kd-tree to be searched for neighbors      TempCluster	array of temporary clusters      CurrentTemp	index of next temp cluster to be used      Heap		heap used to hold temp clusters - "best" on topOperation:	This routine is designed to be used in concert with the      KDWalk routine.  It will create a potential cluster for      each sample in the kd-tree that is being walked.  This      potential cluster will then be pushed on the heap.Return:		noneExceptions: noneHistory:	5/29/89, DSJ, Created.      7/13/89, DSJ, Removed visibility of kd-tree node data struct.******************************************************************************/void MakePotentialClusters(CLUSTER *Cluster, VISIT Order, INT32 Level) {  HEAPENTRY HeapEntry;  if ((Order == preorder) || (Order == leaf)) {    TempCluster[CurrentTemp].Cluster = Cluster;    HeapEntry.Data = (char *) &(TempCluster[CurrentTemp]);    TempCluster[CurrentTemp].Neighbor =      FindNearestNeighbor (Tree, TempCluster[CurrentTemp].Cluster,      &(HeapEntry.Key));    if (TempCluster[CurrentTemp].Neighbor != NULL) {      HeapStore(Heap, &HeapEntry);      CurrentTemp++;    }  }}                                // MakePotentialClusters/** FindNearestNeighbor *********************************************************Parameters:	Tree		kd-tree to search in for nearest neighbor      Cluster		cluster whose nearest neighbor is to be found      Distance	ptr to variable to report distance foundGlobals:	noneOperation:	This routine searches the specified kd-tree for the nearest      neighbor of the specified cluster.  It actually uses the      kd routines to find the 2 nearest neighbors since one of them      will be the original cluster.  A pointer to the nearest      neighbor is returned, if it can be found, otherwise NULL is      returned.  The distance between the 2 nodes is placed      in the specified variable.Return:		Pointer to the nearest neighbor of Cluster, or NULLExceptions: noneHistory:	5/29/89, DSJ, Created.      7/13/89, DSJ, Removed visibility of kd-tree node data struct********************************************************************************/CLUSTER *FindNearestNeighbor (KDTREE * Tree, CLUSTER * Cluster, FLOAT32 * Distance)#define MAXNEIGHBORS  2#define MAXDISTANCE   MAX_FLOAT32{  CLUSTER *Neighbor[MAXNEIGHBORS];  FLOAT32 Dist[MAXNEIGHBORS];  INT32 NumberOfNeighbors;  INT32 i;  CLUSTER *BestNeighbor;  // find the 2 nearest neighbors of the cluster  NumberOfNeighbors = KDNearestNeighborSearch    (Tree, Cluster->Mean, MAXNEIGHBORS, MAXDISTANCE, Neighbor, Dist);  // search for the nearest neighbor that is not the cluster itself  *Distance = MAXDISTANCE;  BestNeighbor = NULL;  for (i = 0; i < NumberOfNeighbors; i++) {    if ((Dist[i] < *Distance) && (Neighbor[i] != Cluster)) {      *Distance = Dist[i];      BestNeighbor = Neighbor[i];    }  }  return (BestNeighbor);}                                // FindNearestNeighbor/** MakeNewCluster *************************************************************Parameters:	Clusterer	current clustering environment      TempCluster	potential cluster to make permanentGlobals:	noneOperation:	This routine creates a new permanent cluster from the      clusters specified in TempCluster.  The 2 clusters in      TempCluster are marked as "clustered" and deleted from      the kd-tree.  The new cluster is then added to the kd-tree.      Return: Pointer to the new permanent clusterExceptions:	noneHistory:	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;  // allocate the new cluster and initialize it  Cluster = (CLUSTER *) Emalloc (sizeof (CLUSTER) +    (Clusterer->SampleSize -    1) * sizeof (FLOAT32));  Cluster->Clustered = FALSE;  Cluster->Prototype = FALSE;  Cluster->Left = TempCluster->Cluster;  Cluster->Right = TempCluster->Neighbor;  Cluster->CharID = -1;  // mark the old clusters as "clustered" and delete them from the kd-tree  Cluster->Left->Clustered = TRUE;  Cluster->Right->Clustered = TRUE;  KDDelete (Clusterer->KDTree, Cluster->Left->Mean, Cluster->Left);  KDDelete (Clusterer->KDTree, Cluster->Right->Mean, Cluster->Right);  // compute the mean and sample count for the new cluster  Cluster->SampleCount =    MergeClusters (Clusterer->SampleSize, Clusterer->ParamDesc,    Cluster->Left->SampleCount, Cluster->Right->SampleCount,    Cluster->Mean, Cluster->Left->Mean, Cluster->Right->Mean);  // add the new cluster to the KD tree  KDStore (Clusterer->KDTree, Cluster->Mean, Cluster);  return (Cluster);}                                // MakeNewCluster/** MergeClusters ************************************************************Parameters:	N	# of dimensions (size of arrays)      ParamDesc	array of dimension descriptions      n1, n2	number of samples in each old cluster      m	array to hold mean of new cluster      m1, m2	arrays containing means of old clustersGlobals:	NoneOperation:	This routine merges two clusters into one larger cluster.      To do this it computes the number of samples in the new      cluster and the mean of the new cluster.  The ParamDesc      information is used to ensure that circular dimensions      are handled correctly.Return:		The number of samples in the new cluster.Exceptions:	NoneHistory:	5/31/89, DSJ, Created.*********************************************************************************/INT32MergeClusters (INT16 N,register PARAM_DESC ParamDesc[],register INT32 n1,register INT32 n2,register FLOAT32 m[],register FLOAT32 m1[], register FLOAT32 m2[]) {  register INT32 i, n;  n = n1 + n2;  for (i = N; i > 0; i--, ParamDesc++, m++, m1++, m2++) {    if (ParamDesc->Circular) {      // if distance between means is greater than allowed      // reduce upper point by one "rotation" to compute mean      // then normalize the mean back into the accepted range      if ((*m2 - *m1) > ParamDesc->HalfRange) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品理伦片| 奇米色777欧美一区二区| 成人免费在线播放视频| 国产乱理伦片在线观看夜一区| 欧美在线观看禁18| 亚洲高清在线视频| 久久亚洲一区二区三区四区| 久久精品国产免费看久久精品| 欧美日韩极品在线观看一区| 午夜精品影院在线观看| 欧美日韩午夜在线视频| 制服丝袜在线91| 日本丶国产丶欧美色综合| 国产精品久久久久久户外露出 | 中文字幕一区二区三区蜜月 | 日韩美女久久久| 91丨九色丨国产丨porny| 亚洲在线视频免费观看| 91精品国产综合久久香蕉麻豆| 精品亚洲aⅴ乱码一区二区三区| 欧美一级片在线观看| 久久av老司机精品网站导航| 91美女视频网站| 亚洲日本韩国一区| 欧美性猛交一区二区三区精品| 中文字幕第一区| 欧美综合一区二区| 国产综合色视频| 亚洲一区在线电影| 91精品国产综合久久婷婷香蕉| 午夜精品久久久久久久99樱桃| 日韩一级二级三级| 韩国三级中文字幕hd久久精品| 中文字幕+乱码+中文字幕一区| 欧美久久婷婷综合色| 国产精品99久久久久| 免费观看在线综合| 一区二区在线观看免费视频播放 | 成人丝袜视频网| 午夜激情综合网| 亚洲毛片av在线| 国产免费久久精品| 精品国产三级a在线观看| 在线免费不卡视频| 国产成人免费视| 欧美最猛性xxxxx直播| a亚洲天堂av| 美女国产一区二区三区| 欧美精品一区二区三区视频| 色婷婷av一区| 成人国产精品视频| 国产成人在线视频免费播放| 日本亚洲视频在线| 日产国产欧美视频一区精品| 午夜精品久久久久久久久久久 | 亚洲精品久久7777| 国产精品福利电影一区二区三区四区| 欧美日韩国产综合久久 | 国产午夜亚洲精品午夜鲁丝片| 欧美日高清视频| 欧美片网站yy| 337p日本欧洲亚洲大胆精品| 精品国产91乱码一区二区三区| 久久亚洲捆绑美女| 国产精品福利影院| 亚洲超碰精品一区二区| 日韩制服丝袜先锋影音| 蜜臀av一区二区在线免费观看| 国产福利电影一区二区三区| 国产露脸91国语对白| 色吧成人激情小说| 日韩亚洲国产中文字幕欧美| 久久免费美女视频| 一区二区在线免费| 国产美女精品人人做人人爽| av电影在线观看不卡| 欧美一区二区三区男人的天堂| 精品国产91久久久久久久妲己 | 91精品国产黑色紧身裤美女| 精品99久久久久久| 一区二区三区高清| 免费一区二区视频| 91久久精品一区二区三区| 精品日韩在线观看| 亚洲国产综合91精品麻豆| 国产一区二区三区| 欧洲亚洲国产日韩| 久久久久9999亚洲精品| 五月天亚洲精品| av电影在线观看完整版一区二区| 精品久久久久99| 午夜精品久久久久影视| 99久久精品国产导航| 欧美va天堂va视频va在线| 一区二区在线观看不卡| 不卡欧美aaaaa| 日韩三级免费观看| 亚洲成人免费观看| kk眼镜猥琐国模调教系列一区二区| 久久这里只精品最新地址| 首页欧美精品中文字幕| 欧美色视频一区| 亚洲精品视频免费观看| 国产乱人伦偷精品视频不卡| 欧美变态tickle挠乳网站| 午夜不卡av免费| 色综合天天综合网天天看片| 国产日韩欧美a| 成人综合在线网站| 久久久精品黄色| 韩国精品免费视频| 国产亚洲精品久| 国产激情一区二区三区桃花岛亚洲 | 欧美高清视频不卡网| 一区二区三区在线观看视频| 国产精品乡下勾搭老头1| 久久亚洲精品小早川怜子| 国产福利一区二区三区| 日韩av电影免费观看高清完整版在线观看| 欧美三电影在线| 日韩高清欧美激情| 91影院在线观看| 精品中文字幕一区二区| 最近中文字幕一区二区三区| 欧美三区在线观看| 国产在线播精品第三| 亚洲日本青草视频在线怡红院 | 99精品欧美一区二区蜜桃免费 | 亚洲欧美一区二区三区孕妇| 欧美男同性恋视频网站| 国产乱子轮精品视频| 亚洲国产成人av| 国产精品情趣视频| 久久免费美女视频| 欧美电视剧在线观看完整版| 欧美视频中文字幕| aaa亚洲精品一二三区| 精品系列免费在线观看| 午夜精品福利一区二区三区av| 国产日韩欧美在线一区| 精品久久久影院| 2023国产精品| 久久一区二区三区四区| 欧美一区二区三区在线视频 | 国产美女av一区二区三区| 日本午夜精品一区二区三区电影| 亚洲成人av一区二区| 亚洲亚洲精品在线观看| 亚洲成a人片在线观看中文| 亚洲精品欧美专区| 欧美aⅴ一区二区三区视频| 丝袜美腿亚洲综合| 美女任你摸久久| 精品一区二区av| 国产精品一二三| 国产成a人亚洲精| 国产一区二区按摩在线观看| 看电影不卡的网站| 国产成人av网站| 成人黄色av电影| 欧美性生活大片视频| 成人午夜视频网站| 91国偷自产一区二区开放时间| 91日韩精品一区| 91麻豆精品国产91久久久资源速度| 日韩欧美视频在线| 国产日产精品一区| 亚洲一区二区三区四区中文字幕| 日韩一区欧美一区| 日韩一区二区三区四区| 欧美午夜一区二区三区| 欧美日韩视频不卡| 欧美日韩不卡一区| 精品成人一区二区| 中文字幕欧美一区| 蜜桃av一区二区| 99国产一区二区三精品乱码| 欧美亚洲动漫制服丝袜| 色呦呦国产精品| 久久久美女毛片| 亚洲高清免费在线| 理论电影国产精品| 欧美丝袜自拍制服另类| 欧美精品一区二区久久婷婷| 亚洲免费观看视频| 国产美女在线观看一区| 欧美精品色一区二区三区| 久久久久国色av免费看影院| 亚洲一区在线视频观看| 午夜视频在线观看一区二区| 国产91在线观看丝袜| 欧美一区二区三区日韩视频| 亚洲午夜精品久久久久久久久| 国产中文一区二区三区| 欧美不卡视频一区| 日本强好片久久久久久aaa| 欧美性猛片aaaaaaa做受| 一区二区三区四区在线| av在线不卡观看免费观看| 精品美女在线播放|