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

representativeValue

简介

representativeValueSingletonFuzzySet 类中的一个实例方法,它用于获取模糊集合的代表值。在单例模糊集合中,代表值就是该集合唯一的元素。该方法可以直接被调用或者传入到其他方法中作为回调函数。

语法

SingletonFuzzySet.prototype.representativeValue()

参数

该方法不接受任何参数。

返回值

该方法返回模糊集合的代表值。

示例

const sfs = new SingletonFuzzySet(5);
const repVal = sfs.representativeValue();
console.log(repVal); // 5

异常

该方法不会抛出任何异常。

注意事项

  • 调用该方法前,必须先创建一个 SingletonFuzzySet 类的实例。

兼容性

该方法兼容所有浏览器和 Node.js 环境。

参考资料

  • [SingletonFuzzySet.cpp](https://github.com/oliviercailloux/fuzzylite/blob/master/fuzzylite/fuzzy/Sin...