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

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

?? cluster.cpp

?? 一OCR的相關資料。.希望對研究OCR的朋友有所幫助.
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
        *m = (n1 * *m1 + n2 * (*m2 - ParamDesc->Range)) / n;        if (*m < ParamDesc->Min)          *m += ParamDesc->Range;      }      else if ((*m1 - *m2) > ParamDesc->HalfRange) {        *m = (n1 * (*m1 - ParamDesc->Range) + n2 * *m2) / n;        if (*m < ParamDesc->Min)          *m += ParamDesc->Range;      }      else        *m = (n1 * *m1 + n2 * *m2) / n;    }    else      *m = (n1 * *m1 + n2 * *m2) / n;  }  return (n);}                                // MergeClusters/** ComputePrototypes *******************************************************Parameters:	Clusterer	data structure holding cluster tree      Config		parameters used to control prototype generationGlobals:	NoneOperation:	This routine decides which clusters in the cluster tree      should be represented by prototypes, forms a list of these      prototypes, and places the list in the Clusterer data      structure.Return:		NoneExceptions:	NoneHistory:	5/30/89, DSJ, Created.*******************************************************************************/void ComputePrototypes(CLUSTERER *Clusterer, CLUSTERCONFIG *Config) {  LIST ClusterStack = NIL;  CLUSTER *Cluster;  PROTOTYPE *Prototype;  // use a stack to keep track of clusters waiting to be processed  // initially the only cluster on the stack is the root cluster  if (Clusterer->Root != NULL)    ClusterStack = push (NIL, Clusterer->Root);  // loop until we have analyzed all clusters which are potential prototypes  while (ClusterStack != NIL) {    // remove the next cluster to be analyzed from the stack    // try to make a prototype from the cluster    // if successful, put it on the proto list, else split the cluster    Cluster = (CLUSTER *) first (ClusterStack);    ClusterStack = pop (ClusterStack);    Prototype = MakePrototype (Clusterer, Config, Cluster);    if (Prototype != NULL) {      Clusterer->ProtoList = push (Clusterer->ProtoList, Prototype);    }    else {      ClusterStack = push (ClusterStack, Cluster->Right);      ClusterStack = push (ClusterStack, Cluster->Left);    }  }}                                // ComputePrototypes/** MakePrototype ***********************************************************Parameters:	Clusterer	data structure holding cluster tree      Config		parameters used to control prototype generation      Cluster		cluster to be made into a prototypeGlobals:	NoneOperation:	This routine attempts to create a prototype from the      specified cluster that conforms to the distribution      specified in Config.  If there are too few samples in the      cluster to perform a statistical analysis, then a prototype      is generated but labelled as insignificant.  If the      dimensions of the cluster are not independent, no prototype      is generated and NULL is returned.  If a prototype can be      found that matches the desired distribution then a pointer      to it is returned, otherwise NULL is returned.Return:		Pointer to new prototype or NULLExceptions:	NoneHistory:	6/19/89, DSJ, Created.*******************************************************************************/PROTOTYPE *MakePrototype(CLUSTERER *Clusterer,                         CLUSTERCONFIG *Config,                         CLUSTER *Cluster) {  STATISTICS *Statistics;  PROTOTYPE *Proto;  BUCKETS *Buckets;  // filter out clusters which contain samples from the same character  if (MultipleCharSamples (Clusterer, Cluster, Config->MaxIllegal))    return (NULL);  // compute the covariance matrix and ranges for the cluster  Statistics =    ComputeStatistics (Clusterer->SampleSize, Clusterer->ParamDesc, Cluster);  // check for degenerate clusters which need not be analyzed further  // note that the MinSamples test assumes that all clusters with multiple  // character samples have been removed (as above)  Proto = MakeDegenerateProto (Clusterer->SampleSize, Cluster, Statistics,    Config->ProtoStyle,    (INT32) (Config->MinSamples *    Clusterer->NumChar));  if (Proto != NULL) {    FreeStatistics(Statistics);    return (Proto);  }  // check to ensure that all dimensions are independent  if (!Independent (Clusterer->ParamDesc, Clusterer->SampleSize,  Statistics->CoVariance, Config->Independence)) {    FreeStatistics(Statistics);    return (NULL);  }  if (HOTELLING && Config->ProtoStyle == elliptical) {    Proto = TestEllipticalProto(Clusterer, Cluster, Statistics);    if (Proto != NULL) {      FreeStatistics(Statistics);      return Proto;    }  }  // create a histogram data structure used to evaluate distributions  Buckets = GetBuckets (normal, Cluster->SampleCount, Config->Confidence);  // create a prototype based on the statistics and test it  switch (Config->ProtoStyle) {    case spherical:      Proto = MakeSphericalProto (Clusterer, Cluster, Statistics, Buckets);      break;    case elliptical:      Proto = MakeEllipticalProto (Clusterer, Cluster, Statistics, Buckets);      break;    case mixed:      Proto = MakeMixedProto (Clusterer, Cluster, Statistics, Buckets,        Config->Confidence);      break;    case automatic:      Proto = MakeSphericalProto (Clusterer, Cluster, Statistics, Buckets);      if (Proto != NULL)        break;      Proto = MakeEllipticalProto (Clusterer, Cluster, Statistics, Buckets);      if (Proto != NULL)        break;      Proto = MakeMixedProto (Clusterer, Cluster, Statistics, Buckets,        Config->Confidence);      break;  }  FreeBuckets(Buckets);  FreeStatistics(Statistics);  return (Proto);}                                // MakePrototype/** MakeDegenerateProto ******************************************************Parameters:	N		number of dimensions      Cluster		cluster being analyzed      Statistics	statistical info about cluster      Style		type of prototype to be generated      MinSamples	minimum number of samples in a clusterGlobals:	NoneOperation:	This routine checks for clusters which are degenerate and      therefore cannot be analyzed in a statistically valid way.      A cluster is defined as degenerate if it does not have at      least MINSAMPLESNEEDED samples in it.  If the cluster is      found to be degenerate, a prototype of the specified style      is generated and marked as insignificant.  A cluster is      also degenerate if it does not have at least MinSamples      samples in it.      If the cluster is not degenerate, NULL is returned.Return:		Pointer to degenerate prototype or NULL.Exceptions:	NoneHistory:	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 N,                               CLUSTER *Cluster,                               STATISTICS *Statistics,                               PROTOSTYLE Style,                               INT32 MinSamples) {  PROTOTYPE *Proto = NULL;  if (MinSamples < MINSAMPLESNEEDED)    MinSamples = MINSAMPLESNEEDED;  if (Cluster->SampleCount < MinSamples) {    switch (Style) {      case spherical:        Proto = NewSphericalProto (N, Cluster, Statistics);        break;      case elliptical:      case automatic:        Proto = NewEllipticalProto (N, Cluster, Statistics);        break;      case mixed:        Proto = NewMixedProto (N, Cluster, Statistics);        break;    }    Proto->Significant = FALSE;  }  return (Proto);}                                // MakeDegenerateProto/** TestEllipticalProto ****************************************************Parameters:	Clusterer	data struct containing samples being clustered      Cluster		cluster to be made into an elliptical prototype      Statistics	statistical info about clusterGlobals:	NoneOperation:	This routine tests the specified cluster to see if ***     there is a statistically significant difference between*     the sub-clusters that would be made if the cluster were to*     be split. If not, then a new prototype is formed and*     returned to the caller. If there is, then NULL is returned*     to the caller.Return:		Pointer to new elliptical prototype or NULL.****************************************************************************/PROTOTYPE *TestEllipticalProto(CLUSTERER *Clusterer,                               CLUSTER *Cluster,                               STATISTICS *Statistics) {  int N = Clusterer->SampleSize;  CLUSTER* Left = Cluster->Left;  CLUSTER* Right = Cluster->Right;  if (Left == NULL || Right == NULL)    return NULL;  int TotalDims = Left->SampleCount + Right->SampleCount;  if (TotalDims < N + 1)    return NULL;  FLOAT32* Inverse = (FLOAT32 *) Emalloc(N * N * sizeof(FLOAT32));  FLOAT32* Delta = (FLOAT32*) Emalloc(N * sizeof(FLOAT32));  double err = InvertMatrix(Statistics->CoVariance, N, Inverse);  if (err > 1) {    cprintf("Clustering error: Matrix inverse failed with error %g\n", err);  }  for (int dim = 0; dim < N; ++dim) {    Delta[dim] = Left->Mean[dim] - Right->Mean[dim];  }  // Compute Hotelling's T-squared.  double Tsq = 0.0;  for (int x = 0; x < N; ++x) {    double temp = 0.0;    for (int y = 0; y < N; ++y) {      temp += Inverse[y + N*x] * Delta[y];    }    Tsq += Delta[x] * temp;  }  memfree(Inverse);  memfree(Delta);  Tsq *= Left->SampleCount * Right->SampleCount / TotalDims;  double F = Tsq * (TotalDims - N - 1) / ((TotalDims - N) * 2);  int Fx = N;  if (Fx > FTABLE_X)    Fx = FTABLE_X;  --Fx;  int Fy = TotalDims - N - 1;  if (Fy > FTABLE_Y)    Fy = FTABLE_Y;  --Fy;  if (F < FTable[Fy][Fx]) {    return NewEllipticalProto (Clusterer->SampleSize, Cluster, Statistics);  }  return NULL;}/* MakeSphericalProto *******************************************************Parameters:	Clusterer	data struct containing samples being clustered      Cluster		cluster to be made into a spherical prototype      Statistics	statistical info about cluster      Buckets		histogram struct used to analyze distributionGlobals:	NoneOperation:	This routine tests the specified cluster to see if it can      be approximated by a spherical normal distribution.  If it      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 spherical prototype or NULL.Exceptions:	NoneHistory:	6/1/89, DSJ, Created.******************************************************************************/PROTOTYPE *MakeSphericalProto(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->AvgVariance)));    if (!DistributionOK (Buckets))      break;  }  // if all dimensions matched a normal distribution, make a proto  if (i >= Clusterer->SampleSize)    Proto = NewSphericalProto (Clusterer->SampleSize, Cluster, Statistics);  return (Proto);}                                // MakeSphericalProto/** MakeEllipticalProto ****************************************************Parameters:	Clusterer	data struct containing samples being clustered      Cluster		cluster to be made into an elliptical prototype      Statistics	statistical info about cluster      Buckets		histogram struct used to analyze distributionGlobals:	NoneOperation:	This routine tests the specified cluster to see if it can      be approximated by an elliptical normal distribution.  If it

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久嫩草精品久久久精品一| 久久夜色精品国产欧美乱极品| 国产拍欧美日韩视频二区| 国产激情视频一区二区三区欧美 | 精彩视频一区二区| 久久婷婷国产综合国色天香 | 中文字幕国产精品一区二区| 精品在线观看免费| 国产精品久久精品日日| 99re这里只有精品6| 亚洲午夜久久久| 日韩午夜中文字幕| 国产曰批免费观看久久久| 国产日产欧产精品推荐色| 色综合天天综合给合国产| 五月综合激情日本mⅴ| 精品国产乱码久久| 欧美午夜精品久久久久久超碰| 午夜电影一区二区三区| 国产欧美日韩综合| 欧美日韩黄色影视| 欧美在线视频日韩| a亚洲天堂av| 国产精品一区久久久久| 一区二区成人在线| 国产精品免费视频观看| 欧美精品久久天天躁| 国产成人在线电影| 视频一区欧美日韩| 中文字幕不卡一区| 这里只有精品视频在线观看| 99国产精品视频免费观看| 美日韩一级片在线观看| 日韩精品亚洲一区二区三区免费| 国产精品久久久久久久裸模 | 亚洲精品国产精华液| 久久精品一区蜜桃臀影院| 亚洲精品一区二区三区香蕉 | 天天亚洲美女在线视频| 日韩精品一区二区三区中文不卡 | 亚洲另类春色校园小说| 亚洲欧洲三级电影| 亚洲狠狠丁香婷婷综合久久久| 欧美日韩在线播放三区四区| 亚洲综合男人的天堂| 亚洲视频一区二区在线| 日韩女优制服丝袜电影| 日韩一区二区精品在线观看| 2017欧美狠狠色| 亚洲欧美一区二区三区国产精品 | 亚洲精品免费视频| 久久免费精品国产久精品久久久久 | 精品一区二区在线播放| 国产成人在线观看| 久久成人羞羞网站| 国产激情一区二区三区四区| 国产精品一级在线| 欧美亚洲一区三区| 久久免费看少妇高潮| 亚洲午夜久久久久中文字幕久| 精彩视频一区二区| 日韩欧美亚洲国产精品字幕久久久| 中文字幕日韩一区二区| 免费在线观看一区| 91麻豆精东视频| 国产精品美女久久久久久久久久久| 亚洲午夜久久久久中文字幕久| 国产一区视频网站| 欧美一区二区三区免费大片 | 欧美一级精品在线| 亚洲午夜免费视频| 91色综合久久久久婷婷| 亚洲欧美日本韩国| 欧美日韩小视频| 天天综合网 天天综合色| 成人免费三级在线| 精品日韩成人av| 国产综合久久久久影院| 欧美电影免费提供在线观看| 日韩精品电影一区亚洲| 欧日韩精品视频| 亚洲一区在线观看视频| 欧美日韩精品系列| 久久国产婷婷国产香蕉| 欧美不卡123| a在线欧美一区| 亚洲少妇屁股交4| 538在线一区二区精品国产| 日韩精品五月天| 精品美女一区二区| 国产成人精品免费视频网站| 欧美韩国日本综合| 欧美一级片在线看| 国内一区二区视频| 亚洲午夜激情av| ww久久中文字幕| 欧美在线免费观看亚洲| 国产一区二区三区美女| 1区2区3区欧美| 国产日韩高清在线| 久久蜜桃av一区精品变态类天堂| 高清视频一区二区| 午夜欧美电影在线观看| 中文字幕中文在线不卡住| 91精品国产一区二区三区| 成人av集中营| 国产老女人精品毛片久久| 日本成人在线看| 五月综合激情婷婷六月色窝| 亚洲欧美激情在线| 亚洲欧洲一区二区在线播放| 制服视频三区第一页精品| 99久久精品国产观看| 国产精品99久| 国产成人亚洲精品狼色在线| 经典三级在线一区| 国产在线日韩欧美| 国产在线不卡视频| 麻豆成人91精品二区三区| 亚洲欧美日韩小说| 一区二区三区丝袜| 中文一区二区在线观看| 欧美吞精做爰啪啪高潮| 欧美亚洲国产bt| 在线免费视频一区二区| 欧美日韩亚洲综合在线| 日韩一本二本av| 久久亚洲精品小早川怜子| 国产精品美女久久久久久久久久久| 国产精品久久精品日日| 亚洲美女视频一区| 五月婷婷色综合| 男女性色大片免费观看一区二区| 日产国产高清一区二区三区 | 中文字幕欧美区| 亚洲高清久久久| 国产一区二区三区四区在线观看| 麻豆精品在线看| 91在线视频免费91| 欧美一区二区三区成人| 久久精品人人爽人人爽| 亚洲一区二区在线免费看| 韩国视频一区二区| 色婷婷国产精品久久包臀| 欧美一区二区视频网站| 精品乱码亚洲一区二区不卡| 最新成人av在线| 三级久久三级久久| 成人a区在线观看| 日韩欧美国产综合在线一区二区三区| 精品国产乱码久久久久久蜜臀| 亚洲欧美日韩在线| 91伊人久久大香线蕉| 精品免费99久久| 午夜欧美大尺度福利影院在线看| 成人性生交大片| 国产喂奶挤奶一区二区三区| 亚洲电影在线免费观看| 色94色欧美sute亚洲线路二| 亚洲欧美另类久久久精品| 国产不卡高清在线观看视频| 精品国产一区二区三区av性色 | 国产视频一区不卡| 极品少妇xxxx精品少妇偷拍| 欧美一区二区三区人| 久久精品国产99国产| 久久嫩草精品久久久精品一| 成人一区二区视频| 亚洲国产日韩av| 欧美日韩视频在线一区二区| 日韩国产精品大片| 久久久久久久久久美女| 色综合天天综合网天天看片| 亚洲一区二区三区四区在线| 欧美日韩亚州综合| 免费三级欧美电影| 精品国产免费久久| 国产成人夜色高潮福利影视| 国产精品久久久久三级| 91免费观看视频在线| 亚洲一区二区三区视频在线播放| 69久久99精品久久久久婷婷| 激情综合网最新| 伊人夜夜躁av伊人久久| 久久久亚洲精品一区二区三区| 91猫先生在线| 久久精品噜噜噜成人88aⅴ| 亚洲欧洲99久久| 日韩美女视频一区二区在线观看| 成人美女视频在线观看18| 麻豆久久久久久| 免费在线观看一区| 九九精品一区二区| 一级日本不卡的影视| 久久尤物电影视频在线观看| 色综合久久综合网| 色系网站成人免费| 91网址在线看| 9人人澡人人爽人人精品| 国产一区二区主播在线|