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 函数用于根据给定的输入值更新模糊术语的隶属度。

语法

fuzzyTerm.updateDegreeOfMembership(inputValue);

参数

  • inputValue:必选参数。表示输入值的实数。该值用于更新模糊术语的隶属度。

返回值

该函数没有返回值,而是直接更新模糊术语对象的隶属度。

示例

let fuzzyTerm = new FuzzyTerm();

fuzzyTerm.updateDegreeOfMembership(2.5);
console.log(fuzzyTerm.degreeOfMembership); // 输出 1

fuzzyTerm.updateDegreeOfMembership(4);
console.log(fuzzyTerm.degreeOfMembership); // 输出 0.5

fuzzyTerm.updateDegreeOfMembership(6);
console.log(fuzzyTerm.degreeOfMembership); // 输出 0

注意事项

  • 如果输入值超出了模糊术语的取值范围,则会自动被限制在最小或最大取值之内。
  • 本函数只适用于由单一隶属函数构成的模糊术语,不能用于复合模糊术语的更新。