001 002 package algo; 003 004 /** 005 * A Path in a Graph. 006 * @author Heinz Kredel. 007 */ 008 public interface Path extends Cloneable { 009 010 /* 011 * empty path, all n points unused. 012 use with Java 5 013 */ 014 // public static Path emptyPath(Graph g); 015 016 /* 017 * standard path from point 0 to point n-1 to 0. 018 use with Java 5 019 */ 020 // public static Path standardPath(Graph g); 021 022 023 /** 024 * return a copy of this with maximal used array. 025 */ 026 public Path copyMax(); 027 028 029 /** 030 * get array of next possible paths. 031 */ 032 public Path[] nextPaths(); 033 034 035 /** 036 * get next possible path, reusing used array. 037 * @param pos position in unused array. 038 */ 039 public Path nextPath(int pos); 040 041 042 public String toString(); 043 044 045 public int length(); 046 047 048 public int maxsize(); 049 050 051 public double cost(); 052 053 054 public Object clone(); 055 056 // protected static double cost(double c); 057 058 }