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

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

?? connect.cc

?? 模糊聚類分析的源程序!
?? CC
字號:
//**************************************************************//*   filename: connect.cc                                     *//*                                                            *//**************************************************************//* programmed by: Thomas Wagner                               *//* last change: 22-05-95                                      *//**************************************************************#include <stdio.h>#include <stdlib.h>#include <values.h>#include <X11/Xlib.h>#include "daten.h"#include "connect.h"extern blackpix, buttonpix;void CalculatePoints (XPoint Points[]){  double length;  double xdiff, ydiff;  length = sqrt ((Points[2].x - Points[0].x) * (Points[2].x - Points[0].x) +		 (Points[2].y - Points[0].y) * (Points[2].y - Points[0].y));  if (length == 0)    length = 1.0;  xdiff = (Points[2].x - Points[0].x) / length;  ydiff = (Points[2].y - Points[0].y) / length;  Points[1].x = Points[0].x - (int) (ARROWWIDTH * ydiff);  Points[1].y = Points[0].y + (int) (ARROWWIDTH * xdiff);  Points[3].x = Points[0].x + (int) (ARROWWIDTH * ydiff);  Points[3].y = Points[0].y - (int) (ARROWWIDTH * xdiff);}Connection::Connection (Display * initdisplay,	    GC initgc,	    MainWindow * parentwindow,	    short startx, short starty,	    short endx, short endy){  status = CONNECTSTATUS_VISIBLE;  Start = End = 0;  Points[0].x = startx;  Points[0].y = starty;  Points[2].x = endx;  Points[2].y = endy;  CalculatePoints (Points);  gc = initgc;  display = initdisplay;  mainwindow = parentwindow;  *(mainwindow->GetConnectlist ()) += this;};Connection::~Connection (){  *(mainwindow->GetConnectlist ()) -= this;}MoveableIcon *Connection::GetStartIcon (){  return Start;}MoveableIcon *Connection::GetEndIcon (){  return End;}void Connection::SendActiontoStart (int actionnumber, int value){  Start->Action (actionnumber, value);}void Connection::SendActiontoEnd (int actionnumber, int value){  End->Action (actionnumber, value);}double Connection::CalculateDistance (int x, int y, char *pointtyp){// first: test if (x,y) is in the area between Points[0] and Points[2]  // diff: vector between Points[0] and Points[2]  double diff[2];  double d;  diff[0] = (Points[2].x - Points[0].x);  diff[1] = (Points[2].y - Points[0].y);// calculate cos*const (const:vectors not normified)  d = (x - Points[0].x) * diff[0] +    (y - Points[0].y) * diff[1];  if (d < 0.0)			// distance is distance between (x,y) and Points[0]   {    *pointtyp = STARTPOINT;    return sqrt ((Points[0].x - x) * (Points[0].x - x) +		 (Points[0].y - y) * (Points[0].y - y));  }// calculate cos*const (const:vectors not normified)  d = (Points[2].x - x) * diff[0] +    (Points[2].y - y) * diff[1];  if (d < 0.0)			// distance is distance between (x,y) and Points[2]   {    *pointtyp = ENDPOINT;    return sqrt ((Points[2].x - x) * (Points[2].x - x) +		 (Points[2].y - y) * (Points[2].y - y));  }// calculating distance of (x,y) from line g  // hessische normalform g:n*p-d=0  // distance of p1 from g is distance=n*p1-d  // (d=n*p ,p is point on g)  // n: normalvector  // p1:(x,y)  // d: d  double distance;  double length = sqrt ((Points[2].x - Points[0].x) * (Points[2].x - Points[0].x) +		 (Points[2].y - Points[0].y) * (Points[2].y - Points[0].y));  double normalvector[2];  if (length != 0.0) {    normalvector[0] = -diff[1] / length;    normalvector[1] = diff[0] / length;  } else {    normalvector[0] = 1.0;    normalvector[1] = 0.0;  }  d = Points[0].x * normalvector[0] +    Points[0].y * normalvector[1];  distance = x * normalvector[0] + y * normalvector[1] - d;// calculate if start- or endpoint  if (((Points[2].x - x) * (Points[2].x - x) + (Points[2].y - y) * (Points[2].y - y))      < ((Points[0].x - x) * (Points[0].x - x) + (Points[0].y - y) * (Points[0].y - y)))    *pointtyp = ENDPOINT;  else    *pointtyp = STARTPOINT;  if (distance > 0)    return distance;  else    return -distance;}void Connection::SetStart (short x, short y){  Points[0].x = x;  Points[0].y = y;  CalculatePoints (Points);}void Connection::SetEnd (short x, short y){  Points[2].x = x;  Points[2].y = y;  CalculatePoints (Points);}void Connection::MoveStart (short x, short y){  SetStart (GetStartx () + x, GetStarty () + y);  CalculatePoints (Points);}void Connection::MoveEnd (short x, short y){  SetEnd (GetEndx () + x, GetEndy () + y);  CalculatePoints (Points);}void Connection::ErasetempArrow (){  XSetForeground (display, gc, blackpix);  XSetFunction (display, gc, GXxor);  XDrawLines (display, mainwindow->GetWindow (), gc, Points + 1, ARROWPOINTNUMBER, CoordModeOrigin);  XSetFunction (display, gc, GXcopy);}void Connection::DrawtempArrow (){  XSetFunction (display, gc, GXxor);  CalculatePoints (Points);  XSetForeground (display, gc, blackpix);  XDrawLines (display, mainwindow->GetWindow (), gc, Points + 1, ARROWPOINTNUMBER, CoordModeOrigin);  XSetFunction (display, gc, GXcopy);}void Connection::DrawtempArrow (short x, short y){  XSetFunction (display, gc, GXxor);  Points[2].x = x;  Points[2].y = y;  CalculatePoints (Points);  XSetForeground (display, gc, blackpix);  XDrawLines (display, mainwindow->GetWindow (), gc, Points + 1, ARROWPOINTNUMBER, CoordModeOrigin);  XSetFunction (display, gc, GXcopy);}void Connection::DrawArrow (){  XSetForeground (display, gc, blackpix);  XFillPolygon (display, mainwindow->GetWindow (), gc, Points + 1, ARROWPOINTNUMBER, Convex, CoordModeOrigin);}void Connection::EraseArrow (){  XSetForeground (display, gc, buttonpix);  XFillPolygon (display, mainwindow->GetWindow (), gc, Points + 1, ARROWPOINTNUMBER, Convex, CoordModeOrigin);}Connectlist::Connectlist (){  connection = NULL;  Next = NULL;  Previous = NULL;}char Connectlist::ConnectionExists (MoveableIcon * starticon,			       MoveableIcon * endicon){  Connectlist *temp = this;  while (temp != NULL) {    if ((temp->connection->Start == starticon) &&	(temp->connection->End == endicon))      return TRUE;    temp = temp->Next;  }  return FALSE;}void Connectlist::operator+= (Connection * newconnection){  if (connection == NULL) {    connection = newconnection;    first = this;  } else {    Connectlist *temp = this;    while (temp->Next != NULL)      temp = temp->Next;    temp->Next = new Connectlist ();    temp->Next->Previous = temp;    temp = temp->Next;    temp->first = this;    temp->connection = newconnection;  }}void Connectlist::operator-= (Connection * delconnection){  Connectlist *temp = this, *temp2;// first find connection  while ((temp != NULL) && (temp->connection != delconnection))    temp = temp->Next;  if (temp != NULL)		//connection found   {    if (temp->Next == NULL)	// connection in last element     {      temp->connection = NULL;      if (temp->Previous != NULL) {	temp->Previous->Next = NULL;	delete temp;      }    } else {      temp2 = temp->Next;      temp->connection = temp->Next->connection;      temp->Next = temp->Next->Next;      if (temp2 != NULL) {	temp2->Next = NULL;	temp2->connection = NULL;	delete temp2;      }    }  }}void Connectlist::SendActiontoallEnds (int actionnumber, int value){  Connectlist *temp = this;  Connection *connection = temp->GetConnection ();  while (connection != NULL) {    connection->SendActiontoEnd (actionnumber, value);    temp = temp->GetNext ();    if (temp != NULL)      connection = temp->GetConnection ();    else      connection = NULL;  }}void Connectlist::DrawAllArrow (){  Connectlist *temp = this;  Connection *connection = temp->GetConnection ();  while (connection != NULL) {    if (connection->status & CONNECTSTATUS_VISIBLE)      connection->DrawArrow ();    temp = temp->GetNext ();    if (temp != NULL)      connection = temp->GetConnection ();    else      connection = NULL;  }}Connection *Connectlist::FindnearestConnection (int x, int y, char *pointtyp){  char temppointtyp;  double mindistance = MAXFLOAT;  Connection *nearest = 0;  Connectlist *temp = this;  Connection *connection = temp->GetConnection ();  while (connection != NULL) {    double distance = connection->CalculateDistance (x, y, &temppointtyp);    if (distance < mindistance) {      mindistance = distance;      nearest = connection;      *pointtyp = temppointtyp;    }    temp = temp->GetNext ();    if (temp != NULL)      connection = temp->GetConnection ();    else      connection = NULL;  }  return nearest;}Connectlist::~Connectlist (){  if (connection != NULL)    delete connection;  if (Next != NULL)    delete Next;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
青青国产91久久久久久| 亚洲愉拍自拍另类高清精品| 国产在线精品视频| 久久久久久久免费视频了| 国产精品亚洲综合一区在线观看| 国产欧美视频一区二区| 成人性色生活片| 亚洲免费在线观看| 欧美伦理电影网| 国产综合成人久久大片91| 久久久久青草大香线综合精品| 成人精品高清在线| 亚洲综合在线观看视频| 欧美肥大bbwbbw高潮| 国产一区二区主播在线| 最新高清无码专区| 欧美男女性生活在线直播观看| 精品综合久久久久久8888| 欧美激情一区在线观看| 色久综合一二码| 久久er精品视频| 最新不卡av在线| 日韩精品一区二| 99久久婷婷国产综合精品| 午夜精品影院在线观看| 久久亚洲精品小早川怜子| 不卡的电影网站| 美女脱光内衣内裤视频久久网站| 国产欧美综合色| 欧美日韩国产大片| 成人一区二区视频| 三级久久三级久久| 亚洲国产精品成人综合| 欧美日韩高清一区| 风间由美一区二区三区在线观看 | 免费成人深夜小野草| 久久久久久亚洲综合影院红桃 | 国产激情视频一区二区在线观看 | 国产一区二区三区在线观看精品| 亚洲视频一区在线| 日韩精品一区二区三区视频 | 亚洲欧美电影一区二区| 欧美精品一区二区三区视频| 色女孩综合影院| 丁香婷婷深情五月亚洲| 青青草国产成人av片免费| 中文字幕一区二区三区精华液 | 九九久久精品视频| 午夜成人免费电影| 亚洲欧美一区二区三区孕妇| 久久综合中文字幕| 欧美日韩视频不卡| 一本大道av一区二区在线播放| 国产久卡久卡久卡久卡视频精品| 亚洲一级二级三级在线免费观看| 国产精品久久久久天堂| 亚洲精品一区二区三区99| 欧美丰满少妇xxxxx高潮对白| 色综合咪咪久久| 成人午夜免费av| 国产99久久久国产精品潘金| 麻豆成人av在线| 日本免费新一区视频 | 午夜精品在线看| 亚洲欧美乱综合| 亚洲欧美色图小说| 中文一区在线播放| 欧美高清在线一区| 久久久精品黄色| 精品sm在线观看| 精品捆绑美女sm三区| 日韩欧美专区在线| 日韩久久精品一区| 日韩欧美在线不卡| 日韩丝袜美女视频| 日韩一区二区免费在线电影| 欧美乱熟臀69xxxxxx| 91麻豆精品91久久久久同性| 欧美日韩高清影院| 欧美精品在线视频| 日韩一区二区三区在线视频| 欧美一级二级三级蜜桃| 日韩精品影音先锋| 精品三级在线观看| 国产日本一区二区| 欧美韩国日本综合| 亚洲色图在线播放| 亚洲午夜成aⅴ人片| 午夜视频一区在线观看| 日韩黄色片在线观看| 日韩福利视频导航| 精品一区二区综合| 福利一区二区在线观看| 91网上在线视频| 欧美片网站yy| 欧美成va人片在线观看| 国产调教视频一区| 亚洲欧美日韩国产一区二区三区 | 国产精品18久久久久久久久久久久 | 欧美日韩高清在线播放| 91精品国产综合久久福利软件 | 粉嫩欧美一区二区三区高清影视 | 在线欧美一区二区| 7777精品伊人久久久大香线蕉完整版 | 国产在线精品一区二区| av一二三不卡影片| 欧美日韩综合在线| 久久综合狠狠综合久久综合88 | 亚洲桃色在线一区| 天天影视涩香欲综合网| 久久99这里只有精品| 99精品欧美一区| 欧美巨大另类极品videosbest| 欧美精品一区二区三区蜜桃| 亚洲天天做日日做天天谢日日欢 | 亚洲色大成网站www久久九九| 亚洲影视在线观看| 国产在线视视频有精品| 91免费看`日韩一区二区| 91 com成人网| 国产精品久久久久久久裸模| 午夜电影一区二区| 成人v精品蜜桃久久一区| 欧美另类高清zo欧美| 国产精品毛片a∨一区二区三区| 五月天亚洲婷婷| www.日韩精品| 2023国产精品视频| 亚洲国产精品久久人人爱| 国产一区二区三区四区在线观看| 91九色最新地址| 国产清纯白嫩初高生在线观看91| 日日摸夜夜添夜夜添国产精品| 成人性生交大合| 日韩精品一区二区三区在线播放 | 日韩中文字幕91| 99久久婷婷国产综合精品电影| 日韩欧美一区在线观看| 亚洲一区二区三区中文字幕| 懂色av噜噜一区二区三区av| 91麻豆精品国产91久久久久久| 亚洲欧美在线高清| 经典三级一区二区| 欧美一区二区在线视频| 亚洲综合一区二区精品导航| 成人成人成人在线视频| 久久久久久久久久久99999| 视频一区中文字幕| 欧美日韩中文国产| 亚洲欧美日韩一区二区| 成人高清视频在线观看| 久久嫩草精品久久久精品一| 奇米影视一区二区三区小说| 欧美裸体一区二区三区| 亚洲综合免费观看高清完整版 | 国产欧美视频一区二区三区| 黑人巨大精品欧美黑白配亚洲| 欧美妇女性影城| 午夜精品国产更新| 色综合视频一区二区三区高清| 国产精品久久久久久久久快鸭| 国产成人免费视频一区| www国产精品av| 国产一区二区三区国产| 欧美精品一区二区三区久久久| 久久99在线观看| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 欧美日本韩国一区二区三区视频| 一区二区三区国产精华| 91浏览器在线视频| 樱花影视一区二区| 91久久国产最好的精华液| 亚洲一区二区在线免费看| 欧美视频一区二区在线观看| 伊人夜夜躁av伊人久久| 色综合久久综合| 亚洲在线中文字幕| 欧美精品在线视频| 久久精品噜噜噜成人av农村| 久久亚洲精品国产精品紫薇| 国产乱人伦精品一区二区在线观看| 久久亚洲捆绑美女| 99视频有精品| 亚洲午夜影视影院在线观看| 欧美日韩精品一区二区三区四区| 日韩国产欧美视频| 久久男人中文字幕资源站| 成人国产精品免费观看视频| 一区二区三区中文免费| 欧美在线你懂的| 卡一卡二国产精品| 欧美国产精品一区| 欧美性大战久久久久久久蜜臀| 日本欧美大码aⅴ在线播放| 久久久久国产精品麻豆ai换脸 | 日韩专区欧美专区| 久久久精品天堂| 91看片淫黄大片一级在线观看| 亚洲电影你懂得| 久久精品视频免费|