شرکت نرم افزاری مبین ملکان

تولید کننده انواع نرم افزارهای کاربردی، ارائه دهنده مشاوره و مقالات تخصصی در زمینه برنامه نویسی


Warning: error_log(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/mobinsof/public_html/libraries/simplepie/simplepie.php on line 7523

Warning: error_log(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/mobinsof/public_html/libraries/simplepie/simplepie.php on line 7523

Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/mobinsof/public_html/libraries/joomla/utilities/date.php on line 56

Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/mobinsof/public_html/libraries/joomla/utilities/date.php on line 56

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/mobinsof/public_html/libraries/joomla/utilities/date.php on line 198

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/mobinsof/public_html/libraries/joomla/utilities/date.php on line 198

الگوریتم خوشه بندی C میانگین


این یک پیاده سازی از الگوریتم خوشه بندی C میانگین است که در ++C توسط صالح حاجی آقازاده انجام شده است.

 


#include<iostream.h>
#include<conio.h>
#include<complex.h>
int c,m,n;
double epsilon=0.0;
double u[50][50]={0.0};
double v[50]={0.0};
double x[50]={0.0};
void splash()
{
 clrscr();
 cout<<"Fuzzy c-mean alghoritm ( algoritmeh khosheh-bandieh c miangin).\n\n";
 cout<<"Marahele piadeh-sazi:\n";
 cout<<"1- Megdar dehieh avalieh barayeh m,c,u0 barayeh hadseh khoshehayeh avalieh.\n";
 cout<<"2- Marakezeh khosheha mohasebeh mishavand (vi ha).\n";
 cout<<"3- Mohasebeyeh matrise taalog az roye khoshehayeh mohasebeh shodeh dar 2.\n";
 cout<<"4- Agar ||UL+1-UL|| <=epsilon angah payan, vagarna az marhaleh 2 edameh midahim.\n" ;
 cout<<"\nPress enter to continue...";
 getch();
}
void begir_nemoneha()
{
 clrscr();
 for (int i=1;i<=n;i++)
 {
  cout<<"Lotfan megdare nemoneyeh "< for (int i=1;i<=c;i++)
 {
  for (int k=1;k<=n;k++)
  {
   cout<<"Lotfan mizan taalogeh nemoneh "< for (int i=1;i<=c;i++)
 {
  for (int k=1;k<=n;k++)
  {
   cout< }
}
int algoritm()
{
 int time=1;
 double z1=0.0,z2=0.0;
 double k_old=0.0;
 while (1)
 {
  for (int k=1;k<=n;k++)
  {
   z1=z1+(pow(u[time][k],m)*x[k]);
   z2=z2+pow(u[time][k],m);
  }
  v[time]=z1 / z2;
  z1=0.0;
  z2=0.0;
  for (k=1;k<=n;k++)
  {
   for (int j=1;j<=c;j++)
   {
    z1=z1+pow((pow(x[k]-v[time],2)/pow(x[k]-v[j],2)),(2/m-1));
   }
   u[time][k]=1/z1;
   z1=0.0;
   if (u[time][k]-k_old   k_old=u[time][k];
  }
  time=time+1;
 }
 return 0;
}
int main()
{
 splash();
 clrscr();
 cout<<"Lotfan tedaeh khosheha ra vared konid (c) : ";
 cin>>c;
 cout<<"Lotfan megdareh m ra dar tabeh hadaf moshakhas konid (m=2 tosieh mishavad) : ";
 cin>>m;
 cout<<"Lotfan tedadeh nemoneha ra vared konid (n) : ";
 cin>>n;
 cout<<"Lotfan epsilon (0-1) ra vared konid : ";
 cin>>epsilon;
 begir_nemoneha();
 init_u0();
 algoritm();
 print_u();
 getch();
 return 0;
}


نظرات

هنوز هیچ نظری ارسال نشده است ! شما اولین نفر باشید

نظرشما؟

 
 
 
 
 

یک محصول تصادفی


Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/mobinsof/public_html/libraries/joomla/utilities/date.php on line 198

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/mobinsof/public_html/libraries/joomla/utilities/date.php on line 198

بخش کاربران

ضمانت پرداخت زرین پال


جستجوی سورس کد

ويژوال بيسيک   جاوا

سي پلاس پلاس اي اس پي

آخرین سورس کدها

کانال ما در آپارات

تقویم شمسی


بخشهای فعال


Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/mobinsof/public_html/modules/mod_sections/helper.php on line 33

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/mobinsof/public_html/modules/mod_sections/helper.php on line 33

بیشترین بازدید


Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/mobinsof/public_html/libraries/joomla/utilities/date.php on line 198

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/mobinsof/public_html/libraries/joomla/utilities/date.php on line 198