< Summary

Class:Itinero.Network.Search.Islands.IslandKindCostFunctions
Assembly:Itinero
File(s):/home/runner/work/routing2/routing2/src/Itinero/Network/Search/Islands/IslandKindCostFunctions.cs
Covered lines:8
Uncovered lines:0
Coverable lines:8
Total lines:23
Line coverage:100% (8 of 8)
Covered branches:2
Total branches:2
Branch coverage:100% (2 of 2)
Tag:263_26948838820

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
GetFor(...)100%2100%

File(s)

/home/runner/work/routing2/routing2/src/Itinero/Network/Search/Islands/IslandKindCostFunctions.cs

#LineLine coverage
 1using Itinero.Profiles;
 2using Itinero.Routing.Costs;
 3
 4namespace Itinero.Network.Search.Islands;
 5
 6/// <summary>
 7/// Picks the cost function the classifier should use for a given
 8/// <see cref="IslandKind"/>. <see cref="IslandKind.Full"/> uses the profile's
 9/// own cost function unchanged; <see cref="IslandKind.NonLocal"/> wraps it
 10/// in <see cref="NonLocalCostFunction"/> so L-edges are masked off.
 11/// </summary>
 12internal static class IslandKindCostFunctions
 13{
 14    public static ICostFunction GetFor(RoutingNetwork network, Profile profile, IslandKind kind)
 214815    {
 214816        var inner = network.GetCostFunctionFor(profile);
 214817        return kind switch
 214818        {
 104619            IslandKind.NonLocal => new NonLocalCostFunction(inner),
 110220            _ => inner,
 214821        };
 214822    }
 23}

Methods/Properties

GetFor(...)