Mon répertoire pour le bureau d'étude graphes de 3MIC à l'INSA de Toulouse
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ArcInspector.java 1011B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package org.insa.graphs.algorithm;
  2. import org.insa.graphs.algorithm.AbstractInputData.Mode;
  3. import org.insa.graphs.model.Arc;
  4. import org.insa.graphs.model.GraphStatistics;
  5. /**
  6. * This class can be used to indicate to an algorithm which arcs can be used and
  7. * the costs of the usable arcs..
  8. *
  9. */
  10. public interface ArcInspector {
  11. /**
  12. * Check if the given arc can be used (is allowed).
  13. *
  14. * @param arc Arc to check.
  15. *
  16. * @return true if the given arc is allowed.
  17. */
  18. public boolean isAllowed(Arc arc);
  19. /**
  20. * Find the cost of the given arc.
  21. *
  22. * @param arc Arc for which the cost should be returned.
  23. *
  24. * @return Cost of the arc.
  25. */
  26. public double getCost(Arc arc);
  27. /**
  28. * @return The maximum speed for this inspector, or
  29. * {@link GraphStatistics#NO_MAXIMUM_SPEED} if none is set.
  30. */
  31. public int getMaximumSpeed();
  32. /**
  33. * @return Mode for this arc inspector.
  34. */
  35. public Mode getMode();
  36. }