Routify Documentation
Loading...
Searching...
No Matches
ch.routify.routing.operations.GreenIndexOperation Class Reference
Inheritance diagram for ch.routify.routing.operations.GreenIndexOperation:
[legend]
Collaboration diagram for ch.routify.routing.operations.GreenIndexOperation:
[legend]

Public Member Functions

 GreenIndexOperation (Map< String, Object > params)
 
HashMap< CustomEdge, Double > apply (WeightOperationContext context, HashMap< CustomEdge, Double > current)
 

Detailed Description

Adjusts weights to favour edges with higher green index. The slider value from the request is interpreted as a percentage (0–100) and normalized to [0, 1], while the green index provided by the graph is already in [0, 1] but is clamped defensively.

Constructor & Destructor Documentation

◆ GreenIndexOperation()

ch.routify.routing.operations.GreenIndexOperation.GreenIndexOperation ( Map< String, Object > params)
inline

Member Function Documentation

◆ apply()

HashMap< CustomEdge, Double > ch.routify.routing.operations.GreenIndexOperation.apply ( WeightOperationContext context,
HashMap< CustomEdge, Double > current )
inline

Applies the operation to the current weight map and returns the updated weights.

Parameters
contextshared input data for the pipeline execution
currentcurrent weight map (null for the first operation)
Returns
updated weights (never null)

Implements ch.routify.routing.operations.WeightOperation.


The documentation for this class was generated from the following file: