CDifferencTwoSigmoidalMembershipFunction

Üyelik fonksiyonunu; А1, А2, С1 ve С2 parametrelerine sahip iki sigmoid fonksiyonun farkı şeklinde kullanmak için tasarlanmıştır.

Açıklama

Fonksiyon bir sigmoid eğri temelinde ayarlanır. Argüman değeriyle başlayan ve değeri bire eşit olan üyelik fonksiyonlarının oluşturulmasını sağlar. Bu tip fonksiyonlar "kısa" veya "uzun" gibi sözel terimlerle çalışmak istediğinizde kullanılabilir.

fuzzy_diffsigmoidal_function

Çizelge çizmek için oluşturulmuş bir örnek kod aşağıda verilmiştir.

Bildirim

   class CDifferencTwoSigmoidalMembershipFuncion : public IMembershipFunction

Başlık

   #include <Math\Fuzzy\membershipfunction.mqh>

Kalıtım hiyerarşisi

  CObject

      IMembershipFunction

          CDifferencTwoSigmoidalMembershipFunction

Sınıf yöntemleri

Sınıf yöntemi  

Açıklama

A1

İlk üyelik fonksiyonunun eğim oranını alır/ayarlar.

A2

İkinci üyelik fonksiyonunun eğim oranını alır/ayarlar.

С1

İlk üyelik fonksiyonunun dönüm koordinatı parametresini alır/ayarlar.

С2

İkinci üyelik fonksiyonunun dönüm koordinatı parametresini alır/ayarlar.

GetValue

Üyelik fonksiyonunun değerini belli bir argümana göre hesaplar.

Sınıftan türetilen yöntemler CObject

Prev, Prev, Next, Next, Save, Load, Type, Compare

Örnek

//+------------------------------------------------------------------+
//|                      DifferencTwoSigmoidalMembershipFunction.mq5 |
//|                         Copyright 2000-2024, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#include <Math\Fuzzy\membershipfunction.mqh>
#include <Graphics\Graphic.mqh>
//--- Üyelik fonksiyonlarını oluştur
CDifferencTwoSigmoidalMembershipFunction func1(5,1,8,7);
CDifferencTwoSigmoidalMembershipFunction func2(5,4,5,7);
CDifferencTwoSigmoidalMembershipFunction func3(5,6,2,7);
//--- üyelik fonksiyonları için örtüler oluştur
double DifferencTwoSigmoidalMembershipFunction1(double x) { return(func1.GetValue(x)); }
double DifferencTwoSigmoidalMembershipFunction2(double x) { return(func2.GetValue(x)); }
double DifferencTwoSigmoidalMembershipFunction3(double x) { return(func3.GetValue(x)); }
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//--- grafiği oluştur
   CGraphic graphic;
   if(!graphic.Create(0,"DifferencTwoSigmoidalMembershipFunction",0,30,30,780,380))
     {
      graphic.Attach(0,"DifferencTwoSigmoidalMembershipFunction");
     }
   graphic.HistoryNameWidth(70);
   graphic.BackgroundMain("DifferencTwoSigmoidalMembershipFunction");
   graphic.BackgroundMainSize(16);
//--- eğri oluştur
   graphic.CurveAdd(DifferencTwoSigmoidalMembershipFunction1,0.0,10.0,0.1,CURVE_LINES,"[5, 1, 8, 7]");
   graphic.CurveAdd(DifferencTwoSigmoidalMembershipFunction2,0.0,10.0,0.1,CURVE_LINES,"[5, 4, 5, 7]");
   graphic.CurveAdd(DifferencTwoSigmoidalMembershipFunction3,0.0,10.0,0.1,CURVE_LINES,"[5, 6, 2, 7]");
//--- X-ekseninin özelliklerini ayarla
   graphic.XAxis().AutoScale(false);
   graphic.XAxis().Min(0.0);
   graphic.XAxis().Max(10.0);
   graphic.XAxis().DefaultStep(1.0);
//--- Y-ekseninin özelliklerini ayarla
   graphic.YAxis().AutoScale(false);
   graphic.YAxis().Min(0.0);
   graphic.YAxis().Max(1.1);
   graphic.YAxis().DefaultStep(0.2);
//--- çiz
   graphic.CurvePlotAll();
   graphic.Update();
  }