CGeneralizedBellShapedMembershipFunction

А, B 및 С 매개변수로 일반화된 종 모양의 멤버십 함수를 구현하기 위한 클래스.

설명

일반화된 종 모양의 멤버십 함수 모양은 가우스 함수와 유사합니다. 함수는 매끄럽고 전체 정의 영역을 따라 0이 아닌 값을 취합니다.  

fuzzy_gbell_function

샘플 코드(샘플 코드를 플롯팅하기 위한)가 아래에 표시됩니다.

선언

   class CGeneralizedBellShapedMembershipFuncion : public IMembershipFunction

제목

   #include <Math\Fuzzy\membershipfunction.mqh>

상속 계층

  CObject

      IMembershipFunction

          CGeneralizedBellShapedMembershipFunction

클래스 메서드

클래스 메서드  

설명

A

멤버스 함수 집중 비율을 가져오고 설정하기.

B

멤버십 함수 기울기 비율을 가져오고 설정하기.

С

멤버십 함수 최대 좌표를 가져오고 설정하기.

GetValue

지정한 인수를 기준으로 멤버 자격 함수의 값을 계산합니다.

클래스 CObject에서 상속된 메서드

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

//+------------------------------------------------------------------+
//|                      GeneralizedBellShapedMembershipFunction.mq5 |
//|                         Copyright 2000-2024, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#include <Math\Fuzzy\membershipfunction.mqh>
#include <Graphics\Graphic.mqh>
//--- 멤버십 함수 생성
CGeneralizedBellShapedMembershipFunction func1(5, 1, 3);
CGeneralizedBellShapedMembershipFunction func2(5, 2, 3);
CGeneralizedBellShapedMembershipFunction func3(5, 3, 3);
//--- 멤버십 함수에 대한 래퍼 생성
double GeneralizedBellShapedMembershipFunction1(double x) { return(func1.GetValue(x)); }
double GeneralizedBellShapedMembershipFunction2(double x) { return(func2.GetValue(x)); }
double GeneralizedBellShapedMembershipFunction3(double x) { return(func3.GetValue(x)); }
//+------------------------------------------------------------------+
//| 스크립트 프로그램 시작 기능                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//--- 그래픽 생성
  CGraphic 그래픽;
   if(!graphic.Create(0,"GeneralizedBellShapedMembershipFunction",0,30,30,780,380))
     {
      graphic.Attach(0,"GeneralizedBellShapedMembershipFunction");
     }
   graphic.HistoryNameWidth(70);
   graphic.BackgroundMain("GeneralizedBellShapedMembershipFunction");
   graphic.BackgroundMainSize(16);
//--- 곡선 생성
   graphic.CurveAdd(GeneralizedBellShapedMembershipFunction1,0.0,10.0,0.1,CURVE_LINES,"[5, 1, 3]");
   graphic.CurveAdd(GeneralizedBellShapedMembershipFunction2,0.0,10.0,0.1,CURVE_LINES,"[5, 2, 3]");
   graphic.CurveAdd(GeneralizedBellShapedMembershipFunction3,0.0,10.0,0.1,CURVE_LINES,"[5, 3, 3]");
//--- X 축 속성 설정
   graphic.XAxis().AutoScale(false);
   graphic.XAxis().Min(0.0);
   graphic.XAxis().Max(10.0);
   graphic.XAxis().DefaultStep(1.0);
//--- Y 축 속성 설정
   graphic.YAxis().AutoScale(false);
   graphic.YAxis().Min(0.0);
   graphic.YAxis().Max(1.1);
   graphic.YAxis().DefaultStep(0.2);
//--- 플롯
   graphic.CurvePlotAll();
   graphic.Update();
  }