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

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

?? cluster.cpp

?? 一OCR的相關資料。.希望對研究OCR的朋友有所幫助.
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
      can be, then a new prototype is formed and returned to the      caller.  If it can't be, then NULL is returned to the caller.Return:		Pointer to new elliptical prototype or NULL.Exceptions:	NoneHistory:	6/12/89, DSJ, Created.****************************************************************************/PROTOTYPE *MakeEllipticalProto(CLUSTERER *Clusterer,                               CLUSTER *Cluster,                               STATISTICS *Statistics,                               BUCKETS *Buckets) {  PROTOTYPE *Proto = NULL;  int i;  // check that each dimension is a normal distribution  for (i = 0; i < Clusterer->SampleSize; i++) {    if (Clusterer->ParamDesc[i].NonEssential)      continue;    FillBuckets (Buckets, Cluster, i, &(Clusterer->ParamDesc[i]),      Cluster->Mean[i],      sqrt ((FLOAT64) Statistics->      CoVariance[i * (Clusterer->SampleSize + 1)]));    if (!DistributionOK (Buckets))      break;  }  // if all dimensions matched a normal distribution, make a proto  if (i >= Clusterer->SampleSize)    Proto = NewEllipticalProto (Clusterer->SampleSize, Cluster, Statistics);  return (Proto);}                                // MakeEllipticalProto/** MakeMixedProto ***********************************************************Parameters:	Clusterer	data struct containing samples being clustered      Cluster		cluster to be made into a prototype      Statistics	statistical info about cluster      NormalBuckets	histogram struct used to analyze distribution      Confidence	confidence level for alternate distributionsGlobals:	NoneOperation:	This routine tests each dimension of the specified cluster to      see what distribution would best approximate that dimension.      Each dimension is compared to the following distributions      in order: normal, random, uniform.  If each dimension can      be represented by one of these distributions,      then a new prototype is formed and returned to the      caller.  If it can't be, then NULL is returned to the caller.Return:		Pointer to new mixed prototype or NULL.Exceptions:	NoneHistory:	6/12/89, DSJ, Created.********************************************************************************/PROTOTYPE *MakeMixedProto(CLUSTERER *Clusterer,                          CLUSTER *Cluster,                          STATISTICS *Statistics,                          BUCKETS *NormalBuckets,                          FLOAT64 Confidence) {  PROTOTYPE *Proto;  int i;  BUCKETS *UniformBuckets = NULL;  BUCKETS *RandomBuckets = NULL;  // create a mixed proto to work on - initially assume all dimensions normal*/  Proto = NewMixedProto (Clusterer->SampleSize, Cluster, Statistics);  // find the proper distribution for each dimension  for (i = 0; i < Clusterer->SampleSize; i++) {    if (Clusterer->ParamDesc[i].NonEssential)      continue;    FillBuckets (NormalBuckets, Cluster, i, &(Clusterer->ParamDesc[i]),      Proto->Mean[i],      sqrt ((FLOAT64) Proto->Variance.Elliptical[i]));    if (DistributionOK (NormalBuckets))      continue;    if (RandomBuckets == NULL)      RandomBuckets =        GetBuckets (D_random, Cluster->SampleCount, Confidence);    MakeDimRandom (i, Proto, &(Clusterer->ParamDesc[i]));    FillBuckets (RandomBuckets, Cluster, i, &(Clusterer->ParamDesc[i]),      Proto->Mean[i], Proto->Variance.Elliptical[i]);    if (DistributionOK (RandomBuckets))      continue;    if (UniformBuckets == NULL)      UniformBuckets =        GetBuckets (uniform, Cluster->SampleCount, Confidence);    MakeDimUniform(i, Proto, Statistics);    FillBuckets (UniformBuckets, Cluster, i, &(Clusterer->ParamDesc[i]),      Proto->Mean[i], Proto->Variance.Elliptical[i]);    if (DistributionOK (UniformBuckets))      continue;    break;  }  // if any dimension failed to match a distribution, discard the proto  if (i < Clusterer->SampleSize) {    FreePrototype(Proto);    Proto = NULL;  }  if (UniformBuckets != NULL)    FreeBuckets(UniformBuckets);  if (RandomBuckets != NULL)    FreeBuckets(RandomBuckets);  return (Proto);}                                // MakeMixedProto/* MakeDimRandom *************************************************************Parameters:	i		index of dimension to be changed      Proto		prototype whose dimension is to be altered      ParamDesc	description of specified dimensionGlobals:	NoneOperation:	This routine alters the ith dimension of the specified      mixed prototype to be D_random.Return:		NoneExceptions:	NoneHistory:	6/20/89, DSJ, Created.******************************************************************************/void MakeDimRandom(UINT16 i, PROTOTYPE *Proto, PARAM_DESC *ParamDesc) {  Proto->Distrib[i] = D_random;  Proto->Mean[i] = ParamDesc->MidRange;  Proto->Variance.Elliptical[i] = ParamDesc->HalfRange;  // subtract out the previous magnitude of this dimension from the total  Proto->TotalMagnitude /= Proto->Magnitude.Elliptical[i];  Proto->Magnitude.Elliptical[i] = 1.0 / ParamDesc->Range;  Proto->TotalMagnitude *= Proto->Magnitude.Elliptical[i];  Proto->LogMagnitude = log ((double) Proto->TotalMagnitude);  // note that the proto Weight is irrelevant for D_random protos}                                // MakeDimRandom/** MakeDimUniform ***********************************************************Parameters:	i		index of dimension to be changed      Proto		prototype whose dimension is to be altered      Statistics	statistical info about prototypeGlobals:	NoneOperation:	This routine alters the ith dimension of the specified      mixed prototype to be uniform.Return:		NoneExceptions:	NoneHistory:	6/20/89, DSJ, Created.******************************************************************************/void MakeDimUniform(UINT16 i, PROTOTYPE *Proto, STATISTICS *Statistics) {  Proto->Distrib[i] = uniform;  Proto->Mean[i] = Proto->Cluster->Mean[i] +    (Statistics->Min[i] + Statistics->Max[i]) / 2;  Proto->Variance.Elliptical[i] =    (Statistics->Max[i] - Statistics->Min[i]) / 2;  if (Proto->Variance.Elliptical[i] < MINVARIANCE)    Proto->Variance.Elliptical[i] = MINVARIANCE;  // subtract out the previous magnitude of this dimension from the total  Proto->TotalMagnitude /= Proto->Magnitude.Elliptical[i];  Proto->Magnitude.Elliptical[i] =    1.0 / (2.0 * Proto->Variance.Elliptical[i]);  Proto->TotalMagnitude *= Proto->Magnitude.Elliptical[i];  Proto->LogMagnitude = log ((double) Proto->TotalMagnitude);  // note that the proto Weight is irrelevant for uniform protos}                                // MakeDimUniform/** ComputeStatistics *********************************************************Parameters:	N		number of dimensions      ParamDesc	array of dimension descriptions      Cluster		cluster whose stats are to be computedGlobals:	NoneOperation:	This routine searches the cluster tree for all leaf nodes      which are samples in the specified cluster.  It computes      a full covariance matrix for these samples as well as      keeping track of the ranges (min and max) for each      dimension.  A special data structure is allocated to      return this information to the caller.  An incremental      algorithm for computing statistics is not used because      it will not work with circular dimensions.Return:		Pointer to new data structure containing statisticsExceptions:	NoneHistory:	6/2/89, DSJ, Created.*********************************************************************************/STATISTICS *ComputeStatistics (INT16 N, PARAM_DESC ParamDesc[], CLUSTER * Cluster) {  STATISTICS *Statistics;  int i, j;  FLOAT32 *CoVariance;  FLOAT32 *Distance;  LIST SearchState;  SAMPLE *Sample;  UINT32 SampleCountAdjustedForBias;  // allocate memory to hold the statistics results  Statistics = (STATISTICS *) Emalloc (sizeof (STATISTICS));  Statistics->CoVariance = (FLOAT32 *) Emalloc (N * N * sizeof (FLOAT32));  Statistics->Min = (FLOAT32 *) Emalloc (N * sizeof (FLOAT32));  Statistics->Max = (FLOAT32 *) Emalloc (N * sizeof (FLOAT32));  // allocate temporary memory to hold the sample to mean distances  Distance = (FLOAT32 *) Emalloc (N * sizeof (FLOAT32));  // initialize the statistics  Statistics->AvgVariance = 1.0;  CoVariance = Statistics->CoVariance;  for (i = 0; i < N; i++) {    Statistics->Min[i] = 0.0;    Statistics->Max[i] = 0.0;    for (j = 0; j < N; j++, CoVariance++)      *CoVariance = 0;  }  // find each sample in the cluster and merge it into the statistics  InitSampleSearch(SearchState, Cluster);  while ((Sample = NextSample (&SearchState)) != NULL) {    for (i = 0; i < N; i++) {      Distance[i] = Sample->Mean[i] - Cluster->Mean[i];      if (ParamDesc[i].Circular) {        if (Distance[i] > ParamDesc[i].HalfRange)          Distance[i] -= ParamDesc[i].Range;        if (Distance[i] < -ParamDesc[i].HalfRange)          Distance[i] += ParamDesc[i].Range;      }      if (Distance[i] < Statistics->Min[i])        Statistics->Min[i] = Distance[i];      if (Distance[i] > Statistics->Max[i])        Statistics->Max[i] = Distance[i];    }    CoVariance = Statistics->CoVariance;    for (i = 0; i < N; i++)      for (j = 0; j < N; j++, CoVariance++)        *CoVariance += Distance[i] * Distance[j];  }  // normalize the variances by the total number of samples  // use SampleCount-1 instead of SampleCount to get an unbiased estimate  // also compute the geometic mean of the diagonal variances  // ensure that clusters with only 1 sample are handled correctly  if (Cluster->SampleCount > 1)    SampleCountAdjustedForBias = Cluster->SampleCount - 1;  else    SampleCountAdjustedForBias = 1;  CoVariance = Statistics->CoVariance;  for (i = 0; i < N; i++)  for (j = 0; j < N; j++, CoVariance++) {    *CoVariance /= SampleCountAdjustedForBias;    if (j == i) {      if (*CoVariance < MINVARIANCE)        *CoVariance = MINVARIANCE;      Statistics->AvgVariance *= *CoVariance;    }  }  Statistics->AvgVariance = (float)pow((double)Statistics->AvgVariance,                                       1.0 / N);  // release temporary memory and return  memfree(Distance);  return (Statistics);}                                // ComputeStatistics/** NewSpericalProto *********************************************************Parameters:	N		number of dimensions      Cluster		cluster to be made into a spherical prototype      Statistics	statistical info about samples in clusterGlobals:	NoneOperation:	This routine creates a spherical prototype data structure to      approximate the samples in the specified cluster.      Spherical prototypes have a single variance which is      common across all dimensions.  All dimensions are normally      distributed and independent.Return:		Pointer to a new spherical prototype data structureExceptions:	NoneHistory:	6/19/89, DSJ, Created.******************************************************************************/PROTOTYPE *NewSphericalProto(UINT16 N,                             CLUSTER *Cluster,                             STATISTICS *Statistics) {  PROTOTYPE *Proto;  Proto = NewSimpleProto (N, Cluster);  Proto->Variance.Spherical = Statistics->AvgVariance;  if (Proto->Variance.Spherical < MINVARIANCE)    Proto->Variance.Spherical = MINVARIANCE;  Proto->Magnitude.Spherical =    1.0 / sqrt ((double) (2.0 * PI * Proto->Variance.Spherical));  Proto->TotalMagnitude = (float)pow((double)Proto->Magnitude.Spherical,                                     (double) N);  Proto->Weight.Spherical = 1.0 / Proto->Variance.Spherical;  Proto->LogMagnitude = log ((double) Proto->TotalMagnitude);  return (Proto);}                                // NewSphericalProto/** NewEllipticalProto *******************************************************Parameters:	N		number of dimensions      Cluster		cluster to be made into an elliptical prototype      Statistics	statistical info about samples in clusterGlobals:	NoneOperation:	This routine creates an elliptical prototype data structure to      approximate the samples in the specified cluster.      Elliptical prototypes have a variance for each dimension.      All dimensions are normally distributed and independent.Return:		Pointer to a new elliptical prototype data structureExceptions:	NoneHistory:	6/19/89, DSJ, Created.*******************************************************************************/PROTOTYPE *NewEllipticalProto(INT16 N,                              CLUSTER *Clust

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美另类高清zo欧美| 欧美无乱码久久久免费午夜一区| 亚洲综合区在线| 91久久国产最好的精华液| 综合欧美一区二区三区| 欧美主播一区二区三区| 天堂一区二区在线| 欧美xxxx在线观看| 丁香啪啪综合成人亚洲小说| 中文字幕一区二区不卡| 91在线观看高清| 亚洲一区二区视频在线| 欧美一区二区三区性视频| 国产综合久久久久久鬼色| 久久精品夜夜夜夜久久| 97超碰欧美中文字幕| 午夜激情久久久| 久久久亚洲高清| 色诱视频网站一区| 人人精品人人爱| 国产精品久久久久久久久动漫 | 一区二区三区四区高清精品免费观看| 成人av在线观| 亚洲国产综合人成综合网站| 欧美一区二区三区系列电影| 国产精品一二二区| 亚洲一区二区三区视频在线| 日韩免费一区二区三区在线播放| 丁香桃色午夜亚洲一区二区三区| 亚洲乱码中文字幕综合| 日韩精品一区国产麻豆| 91亚洲精品一区二区乱码| 日本亚洲一区二区| **性色生活片久久毛片| 日韩女优电影在线观看| 在线观看91视频| 国产一区二区在线免费观看| 有码一区二区三区| 国产亚洲人成网站| 日韩欧美在线一区二区三区| 99精品偷自拍| 国产成人久久精品77777最新版本| 久久久噜噜噜久久人人看| 亚洲三级电影全部在线观看高清| 欧美午夜精品久久久久久超碰| 精品夜夜嗨av一区二区三区| 亚洲制服丝袜一区| 国产农村妇女精品| 91精品国产高清一区二区三区| 91一区二区在线| 国产精品91一区二区| 天天综合天天综合色| 亚洲精品中文在线观看| 国产免费久久精品| 精品少妇一区二区三区视频免付费 | 亚洲色图视频网站| 久久久久久亚洲综合影院红桃| 欧美日韩成人高清| 在线亚洲高清视频| 欧美国产精品v| 国产精品视频一二三区| 欧美人狂配大交3d怪物一区| 成人精品免费看| 激情综合色综合久久| 三级精品在线观看| 亚洲成a人片在线不卡一二三区| 日韩伦理电影网| 国产精品久久福利| 国产精品久久毛片a| 国产亚洲欧美日韩在线一区| 日韩精品影音先锋| 精品国产a毛片| 日韩免费视频线观看| 日韩网站在线看片你懂的| 日韩一级免费观看| 91精品国产91久久久久久最新毛片| 欧美日韩一区中文字幕| 欧美日韩视频专区在线播放| 欧美三级资源在线| 欧美日韩国产一级二级| 91麻豆精品91久久久久同性| 欧美精品xxxxbbbb| 欧美一区二区在线观看| 日韩一本二本av| av在线播放成人| 国产电影一区二区三区| 国产成人啪午夜精品网站男同| 国产真实乱偷精品视频免| 国产一区二区三区精品视频| 国产成人综合精品三级| 粉嫩在线一区二区三区视频| 波多野结衣亚洲一区| 97se亚洲国产综合自在线| 99国产精品久| 欧美在线综合视频| 日韩美女在线视频| 国产三级一区二区| 亚洲视频1区2区| 天天影视网天天综合色在线播放| 美日韩黄色大片| 国产高清不卡一区二区| 色综合网站在线| 欧美一二三四区在线| 国产精品系列在线| 亚洲动漫第一页| 极品少妇xxxx精品少妇偷拍| 成人免费观看av| 欧美吻胸吃奶大尺度电影| 精品乱人伦小说| 自拍偷拍国产亚洲| 欧美精品乱码久久久久久按摩| 欧美性大战久久久久久久蜜臀| 欧美人妖巨大在线| 国产嫩草影院久久久久| 午夜免费久久看| 国产一区二区伦理| 91黄色激情网站| 久久综合九色综合97婷婷女人| 亚洲视频在线一区| 狠狠久久亚洲欧美| 91久久精品午夜一区二区| 精品欧美一区二区久久| 亚洲伦理在线免费看| 精品午夜久久福利影院| 欧美亚男人的天堂| 国产欧美一区二区在线| 无码av免费一区二区三区试看 | 欧美美女直播网站| 国产精品美女久久久久久久久| 午夜婷婷国产麻豆精品| 高清不卡在线观看| 欧美大黄免费观看| 亚洲国产aⅴ成人精品无吗| 不卡免费追剧大全电视剧网站| 欧美久久久久中文字幕| 国产一区二区不卡老阿姨| av电影在线观看完整版一区二区| 欧美美女bb生活片| 一区二区在线电影| 成人激情免费电影网址| 精品国产一区二区三区忘忧草| 一区二区三区欧美日韩| 国产成人三级在线观看| 日韩久久久精品| 日韩精品久久久久久| 欧美无乱码久久久免费午夜一区 | 亚洲卡通欧美制服中文| 国产sm精品调教视频网站| 日韩欧美国产高清| 日韩—二三区免费观看av| 欧美性生活影院| 亚洲美女屁股眼交3| 成人午夜碰碰视频| 日本一区二区三区在线观看| 国精品**一区二区三区在线蜜桃| 4438成人网| 日韩高清中文字幕一区| 欧美日韩一级视频| 午夜天堂影视香蕉久久| 欧美日韩一区二区三区视频| 国产欧美精品一区二区色综合 | 国产欧美日韩在线观看| 久久精品噜噜噜成人av农村| 最新成人av在线| 精品99久久久久久| 亚洲电影视频在线| 丁香天五香天堂综合| 日本一区二区三区高清不卡| 国产精品69久久久久水密桃| 久久众筹精品私拍模特| 国产在线精品国自产拍免费| 欧美大片在线观看一区| 久久国产精品一区二区| 精品久久久久久无| 国产成人免费在线观看| 中文字幕欧美一区| 欧美专区亚洲专区| 日本欧美在线看| 国产亚洲一区二区三区四区| 岛国一区二区三区| 中文字幕日韩一区| 欧美色图片你懂的| 国产精品毛片大码女人| 99精品国产热久久91蜜凸| 亚洲色图清纯唯美| 欧美四级电影在线观看| 免费成人美女在线观看| 久久久蜜桃精品| 97国产一区二区| 午夜成人在线视频| www精品美女久久久tv| 成人网页在线观看| 亚洲一区二区高清| 精品人伦一区二区色婷婷| 9i在线看片成人免费| 亚洲成人av免费| 久久久不卡网国产精品二区| 99这里都是精品| 免费人成黄页网站在线一区二区| 国产午夜亚洲精品理论片色戒 |