CProductTwoSigmoidalMembershipFunction

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

Açıklama

İki sigmoid üyelik fonksiyonun çarpımı, düzgün asimetrik fonksiyonlarla çalışmak için kullanılı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_prodsigmoidal_function

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

Bildirim

   class CProductTwoSigmoidalMembershipFuncion : public IMembershipFunction

Başlık

   #include <Math\Fuzzy\membershipfunction.mqh>

Kalıtım hiyerarşisi

  CObject

      IMembershipFunction

          CProductTwoSigmoidalMembershipFunctions

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.

C1

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

C2

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

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

//+------------------------------------------------------------------+
//|                       ProductTwoSigmoidalMembershipFunctions.mq5 |
//|                         Copyright 2000-2024, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2000-2024, MetaQuotes Ltd."
#property link      "https://www.mql5.com"
#property version   "1.00"
#include <Math\Fuzzy\membershipfunction.mqh>
#include <Graphics\Graphic.mqh>
//--- Üyelik fonksiyonlarını oluştur
CProductTwoSigmoidalMembershipFunctions func1(2,1,-1,7);
CProductTwoSigmoidalMembershipFunctions func2(2,2,-4,7);
CProductTwoSigmoidalMembershipFunctions func3(2,3,-8,7);
//--- üyelik fonksiyonları için örtüler oluştur
double ProductTwoSigmoidalMembershipFunctions1(double x) { return(func1.GetValue(x)); }
double ProductTwoSigmoidalMembershipFunctions2(double x) { return(func2.GetValue(x)); }
double ProductTwoSigmoidalMembershipFunctions3(double x) { return(func3.GetValue(x)); }
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//--- grafiği oluştur
   CGraphic graphic;
   if(!graphic.Create(0,"ProductTwoSigmoidalMembershipFunctions",0,30,30,780,380))
     {
      graphic.Attach(0,"ProductTwoSigmoidalMembershipFunctions");
     }
   graphic.HistoryNameWidth(70);
   graphic.BackgroundMain("ProductTwoSigmoidalMembershipFunctions");
   graphic.BackgroundMainSize(16);
//--- eğri oluştur
   graphic.CurveAdd(ProductTwoSigmoidalMembershipFunctions1,0.0,10.0,0.1,CURVE_LINES,"[2, 1, -1, 7]");
   graphic.CurveAdd(ProductTwoSigmoidalMembershipFunctions2,0.0,10.0,0.1,CURVE_LINES,"[2, 2, -4, 7]");
   graphic.CurveAdd(ProductTwoSigmoidalMembershipFunctions3,0.0,10.0,0.1,CURVE_LINES,"[2, 3, -8, 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();
  }