Package classycle.graph

# Class PathsFinder

java.lang.Object
classycle.graph.PathsFinder

public class PathsFinder extends Object
Class searching for all (or only the shortest) paths between classes of a start set and classes of a final set.

Author:
  Franz-Josef Elmer

## Constructor Summary

Constructors
Constructor
Description
`PathsFinder(VertexCondition startSetCondition, VertexCondition finalSetCondition, boolean shortestPathsOnly)`
Creates an instance for the specified vertex conditions.
`PathsFinder(VertexCondition startSetCondition, VertexCondition finalSetCondition, boolean shortestPathsOnly, boolean directPathsOnly)`
Creates an instance for the specified vertex conditions.

## Method Summary

Modifier and Type
Method
Description
`AtomicVertex[]`
`findPaths(AtomicVertex[] graph)`
Finds all paths from the specified start vertices to the vertices fullfilling the specified condition.
`VertexCondition`
`getFinalSetCondition()`
`VertexCondition`
`getStartSetCondition()`
`boolean`
`isShortestPathsOnly()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### PathsFinder

public PathsFinder(VertexCondition startSetCondition, VertexCondition finalSetCondition, boolean shortestPathsOnly)
Creates an instance for the specified vertex conditions.

Parameters:
  `startSetCondition` - Condition defining the start set.
  `finalSetCondition` - Condition defining the final set.
  `shortestPathsOnly` - if `true` only the shortest paths are returned.

### PathsFinder

public PathsFinder(VertexCondition startSetCondition, VertexCondition finalSetCondition, boolean shortestPathsOnly, boolean directPathsOnly)
Creates an instance for the specified vertex conditions.

Parameters:
  `startSetCondition` - Condition defining the start set.
  `finalSetCondition` - Condition defining the final set.
  `shortestPathsOnly` - if `true` only the shortest paths are returned.
  `directPathsOnly` - if `true` only paths of length 1 are returned.

## Method Details

### getFinalSetCondition

public VertexCondition getFinalSetCondition()

### isShortestPathsOnly

public boolean isShortestPathsOnly()

### getStartSetCondition

public VertexCondition getStartSetCondition()

### findPaths

public AtomicVertex[] findPaths(AtomicVertex[] graph)
Finds all paths from the specified start vertices to the vertices fullfilling the specified condition.

Parameters:
  `graph` - Complete graph.
Returns:
  All vertices including start and end vertices defining the subgraph with all paths.