AABB
AlignmentBehavior
ArriveBehavior
AStar
BFS
BoundingSphere
BVH
BVHNode
Cell
CellSpacePartitioning
CohesionBehavior
CompositeGoal
ConvexHull
Corridor
CostTable
DFS
Dijkstra
Edge
EntityManager
EvadeBehavior
EventDispatcher
Behavior
FollowPathBehavior
FuzzyAND
FuzzyCompositeTerm
FuzzyFAIRLY
FuzzyModule
FuzzyOR
FuzzyRule
FuzzySet
FuzzyTerm
FuzzyVariable
FuzzyVERY
GameEntity
Goal
GoalEvaluator
Graph
GraphUtils
HalfEdge
HeuristicPolicyDijkstra
HeuristicPolicyEuclid
HeuristicPolicyEuclidSquared
HeuristicPolicyManhattan
InterposeBehavior
LeftSCurveFuzzySet
LeftShoulderFuzzySet
LineSegment
Logger
MathUtils
Matrix3
Matrix4
MemoryRecord
MemorySystem
MeshGeometry
MessageDispatcher
MovingEntity
NavEdge
NavMesh
NavMeshLoader
NavNode
Node
NormalDistFuzzySet
OBB
ObstacleAvoidanceBehavior
OffsetPursuitBehavior
OnPathBehavior
Path
Plane
Polygon
Polyhedron
PriorityQueue
PursuitBehavior
Quaternion
Ray
RectangleTriggerRegion
Regular
RightSCurveFuzzySet
RightShoulderFuzzySet
SAT
SeekBehavior
SeparationBehavior
SingletonFuzzySet
Smoother
SphericalTriggerRegion
State
StateMachine
SteeringBehavior
SteeringManager
Task
TaskQueue
Telegram
Think
Time
TriangularFuzzySet
Trigger
TriggerRegion
Vector3
Vehicle
Version
WanderBehavior

updateDegreeOfMembership

描述

updateDegreeOfMembership()方法用于更新模糊集合的隶属度。该方法接受一组输入值,并将它们与模糊集合中的指定曲线进行匹配来计算隶属度。

语法

fuzzySet.updateDegreeOfMembership(inputValues);

参数

  • inputValues:一个数组,其中包含模糊集合中的曲线所需的输入。

返回值

无返回值。

示例

const dataSet = {
  points: [
    [0, 1],
    [5, 0.5],
    [10, 0]
  ]
};
const fuzzySet = new RightSCurveFuzzySet(dataSet);

fuzzySet.updateDegreeOfMembership([2]);

在此示例中,我们创建了一个基于右S曲线的模糊集合,该曲线包含三个数据点。我们接着调用updateDegreeOfMembership(),并将输入值2传递给它。这将计算出输入值2在右S曲线上的隶属度,并将其更新到模糊集合对象的状态中。