Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* (C) Copyright 2017-2023, by Dimitrios Michail and Contributors.
*
* JGraphT : a free Java graph-theory library
*
* See the CONTRIBUTORS.md file distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0, or the
* GNU Lesser General Public License v2.1 or later
* which is available at
* http://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html.
*
* SPDX-License-Identifier: EPL-2.0 OR LGPL-2.1-or-later
*/
package org.jgrapht.alg.shortestpath;
import org.jgrapht.*;
import org.jgrapht.graph.*;
import org.jheaps.*;
import org.jheaps.array.*;
import java.util.*;
import java.util.function.*;
import java.util.stream.*;
/**
* Martin's algorithm for the multi-objective shortest paths problem.
*
*
* Martin's label setting algorithm is a multiple objective extension of Dijkstra's algorithm, where
* the minimum operator is replaced by a dominance test. It computes a maximal complete set of
* efficient paths when all the cost values are non-negative.
*
*
* Note that the multi-objective shortest path problem is a well-known NP-hard problem.
*
* @author Dimitrios Michail
*
* @param the vertex type
* @param the edge type
*/
public class MartinShortestPath
extends BaseMultiObjectiveShortestPathAlgorithm
{
// the edge weight function
private final Function edgeWeightFunction;
// the number of objectives
private final int objectives;
// final labels for each node
private final Map> nodeLabels;
// temporary labels ordered lexicographically
private final Heap