• API Documentation
Show / Hide Table of Contents
  • Rebus
    • Arguments
    • Biome
    • CantorPairing
    • CommandRequest
    • CommandResponse
    • CommandType
    • Commodity
    • Configuration
    • ConflictEventArgs
    • Depths
    • Economy
    • Fleet
    • HexPoint
    • IGameService
    • ILoginService
    • Player
    • Unit
    • User
    • Zone
    • ZoneInfo
  • Rebus.Client
    • GraphicsEngine
    • Layout
    • RpcClient
    • ZoneVisualizer
  • Rebus.Client.Lenses
    • BiomeLens
    • ConstellationLens
    • Lens
    • PopulationLens
    • StarLens
  • Rebus.Server
    • AStarSearch
    • EvaluationContext
    • FisherYatesShuffle
    • JuliaSet
    • PowerSet
  • Rebus.Server.Considerations
    • Agent
    • Behavior
    • BehaviorCollection
    • Consideration
    • ConsiderationCollection
    • FunctionConsideration
    • LinearConsideration
    • QuadraticConsideration
  • Rebus.Server.Functions
    • IFunctions<T>
  • System
    • NegativeExponentialRandom
  • System.Text.Json.Serialization.Converters
    • ComplexConverter
    • CultureInfoConverter
    • IPAddressConverter

Interface IFunctions<T>

Defines graph-node functions used by search algorithms.

Namespace: Rebus.Server.Functions
Assembly: Rebus.Server.dll
Syntax
public interface IFunctions<T>
Type Parameters
Name Description
T

The type of each node in the graph.

Methods

Cost(T, T)

Performs the cost function.

Declaration
int Cost(T value, T neighbor)
Parameters
Type Name Description
T value

The source node.

T neighbor

The neighbor.

Returns
Type Description
Int32

The cost of traveling from the specified value to its specified neighbor.

Heuristic(T, T)

Performs the heuristic function.

Declaration
int Heuristic(T source, T destination)
Parameters
Type Name Description
T source

The source node.

T destination

The destination node.

Returns
Type Description
Int32

The estimated distance from the source to the destination.

Neighbors(T)

Gets the neighbors of a node.

Declaration
IEnumerable<T> Neighbors(T value)
Parameters
Type Name Description
T value

The source node.

Returns
Type Description
IEnumerable<T>

The neighbors of the specified value.

In This Article
Back to top © 2021-2022 Ishan Pranav. All rights reserved. Licensed under the MIT License.