cz.cuni.amis.pogamut.ut2004.navigation.evaluator.bot
Class PathContainer

Package class diagram package PathContainer
java.lang.Object
  extended by cz.cuni.amis.pogamut.ut2004.navigation.evaluator.bot.PathContainer

public class PathContainer
extends Object

Container for path evaluation. Provides paths which should be evaluated.

Author:
Bogo

Constructor Summary
PathContainer(cz.cuni.amis.pogamut.base3d.worldview.IVisionWorldView world)
          Create container for given world view.
PathContainer(Object object, boolean loadFromFile, File dataFile)
           
 
Method Summary
 boolean addTabooPath(Path path)
           
 void build()
          Builds set of paths between all NavPoints of given map.
 void buildFromFile(File file, boolean isRepeat)
          Loads path container from CSV file.
 void buildRelevant()
          Build set of all relevant paths for given map.
 void buildRelevant(int limit)
          Build set of all relevant paths for given map.
 void exportToFile(String path)
           
 Path getPath()
          Get any path from container.
 Path getPath(NavPoint start)
          Get path with start at given NavPoint.
 boolean isEmpty()
          Checks whether container is empty.
 boolean isInitialized()
           
 void removePathsFromFile(String path)
           
 void setWorld(cz.cuni.amis.pogamut.base3d.worldview.IVisionWorldView world)
           
 int size()
          Returns size of the container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathContainer

public PathContainer(cz.cuni.amis.pogamut.base3d.worldview.IVisionWorldView world)
Create container for given world view.

Parameters:
world -

PathContainer

public PathContainer(Object object,
                     boolean loadFromFile,
                     File dataFile)
Method Detail

getPath

public Path getPath()
Get any path from container. Returns null if container is empty.

Returns:
Path to navigate

getPath

public Path getPath(NavPoint start)
Get path with start at given NavPoint. When such path doesn't exist, returns path from nearest NavPoint from which some path exists.

Parameters:
start - Where the path should start
Returns:
Path to navigate

build

public void build()
Builds set of paths between all NavPoints of given map.


buildRelevant

public void buildRelevant(int limit)
Build set of all relevant paths for given map. Relevant paths are paths between NavPoints which are either inventory spots or player starts.

Parameters:
limit - Max number of paths built. If limit < 0 build all paths.

buildRelevant

public void buildRelevant()
Build set of all relevant paths for given map. Relevant paths are paths between NavPoints which are either inventory spots or player starts.


isEmpty

public boolean isEmpty()
Checks whether container is empty.

Returns:
Container is empty

size

public int size()
Returns size of the container. Iterates through values of Map with paths. If sufficient, use isEmpty() instead.

Returns:
Number of paths in the container.

buildFromFile

public void buildFromFile(File file,
                          boolean isRepeat)
Loads path container from CSV file.

Parameters:
file -
isRepeat -

removePathsFromFile

public void removePathsFromFile(String path)

exportToFile

public void exportToFile(String path)

addTabooPath

public boolean addTabooPath(Path path)

setWorld

public void setWorld(cz.cuni.amis.pogamut.base3d.worldview.IVisionWorldView world)

isInitialized

public boolean isInitialized()


Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.