public abstract class EdgeChooseInstance extends WeightedInstance
Constructor and Description |
---|
EdgeChooseInstance() |
EdgeChooseInstance(EdgeChooseInstance spi) |
Modifier and Type | Method and Description |
---|---|
boolean |
chooseEdge(Edge e)
Passes e into the addTreeEdges method
|
java.util.ArrayList<Edge> |
chooseEdges(java.util.List<Edge> edges)
Adds each edge in the passed in list to the set of tree edges if the edge is in this object's graph
|
int |
getNumberVisited() |
boolean |
isChosenEdge(Edge e)
Given an edge, checks if it is a tree edge
|
boolean |
isVisited(Vertex v)
Checks if the passed in vertex is visited
|
void |
setUnvisited(java.util.ArrayList<Edge> edges)
For use with the MinimumSpanningTreeController
Sets all of the edges, if they exist in the graph, to "unvisited"
|
void |
setVisited(java.util.ArrayList<Edge> edges)
For use with the MinimumSpanningTreeController
Sets all of the edges, if they exist in the graph, to "visited"
|
void |
unchooseAllEdges()
Removes all tree edges
|
boolean |
unchooseEdge(Edge e)
It then calls removeTreeEdges and passes in the edge passed into this method
|
java.util.ArrayList<Edge> |
unchooseEdges(java.util.List<Edge> edges)
Checks if each edge in the passed in list is a tree edge and removes it if so
|
addEdge, getAdjacencyMatrixAsString, getWeightForEdge, isEventForThisPuzzleType, setWeight, setWeights, setWeightsBetween, setWeightsForEdges, setWeightsForEdges, weightsToString
addDoppelganger, addGraph, addGraphWithData, addToSelected, addToSelected, addVertex, canRedo, canUndo, checkAndHandlePuzzleCompletion, clearAllSelections, clearHistory, clearTutorial, computeGlobalPoints, connectAllSelectedVertices, connectToSelected, convertMovesToTutorial, copyPuzzle, copyPuzzleSoItHasInitialStateTheSameAsMyCurrentState, copyRequested, copySelected, createNewVertexForPuzzle, currentPuzzleDataToString, deleteSelected, disableHistory, disconnectFromSelected, disconnectSelected, doNotRecordGraphEvents, enableHistory, endGame, forceRedo, getAttemptName, getBasePoints, getCurrentAnnotation, getCurrentMoveOverview, getCurrentUndoableEvent, getData, getDefaultVertexDataObject, getDescription, getDiameter, getDifficultyLevel, getEdgeDataClassName, getEditHelpClassName, getEditorClassName, getFamilyName, getFirstSelected, getFirstTimeBonus, getGameName, getGlobalBest, getGraph, getHelpClassName, getHighScoreBonus, getImprovementBonus, getInstanceClassName, getInterestingTutorialVertices, getMaximumXCoordinate, getMaximumYCoordinate, getMessage, getMinimumSelectedXCoordinate, getMinimumSelectedYCoordinate, getMinimumXCoordinate, getMinimumYCoordinate, getMode, getNumberOfEdges, getNumberOfMoves, getNumberOfVertices, getNumberSelected, getOldHighScore, getPersonalBest, getPlayClassName, getProcessedSolution, getPuzzleID, getPuzzleInstanceName, getPuzzleName, getScore, getSelectedVertices, getSolution, getSolutionAsString, getSolutionID, getThemeClassName, getTimeTaken, getTopOfUndoStack, getTryItInstanceForUseOnPlayScreen, getTutorialData, getUserID, getVertexIndex, getVertices, getVisibility, getVisibleSources, goToNextEvent, grossHistoryDeleteLastEvent, grossHistoryGetLastAddedEvent, grossHistoryGetNextEvent, grossHistoryGetNextEventIndex, grossHistoryIsSaved, grossHistoryIteratorAtBeginning, grossHistoryIteratorAtEnd, grossHistoryNext, grossHistoryPrevious, grossHistorySetSaved, grossHistorySize, grossHistoryToBeginning, grossHistoryToEnd, initialPuzzleDataToString, isCurrentStateValidSolution, isFinishable, isInReplayOrEditTutorialMode, isLocked, isLowerScoreBetter, isPlayable, isSaved, isShowIndices, isSolutionRefinable, isSpecialCopyOK, isTutorial, isValidToTranslationSelection, isVisibleSource, makeCurrentStateInitialState, moveGraphEnded, moveSelectedVerticesEnded, moveStarted, pasteAndConnectCopyOfSelected, pasteCopyOfSelected, performEvents, performEvents, performTutorialEvents, reallySetLocked, recordGraphEvents, redo, removeFromSelected, removeFromSelected, resetVerticesToInitialLocations, restart, runAlgorithms, runuTryIt, selectAll, sendAlgorithmResult, sendMeaninglessEvent, setAttemptName, setData, setDefaultData, setDescription, setFinishable, setGlobalBest, setGraph, setInReplayOrEditTutorialMode, setLocked, setMessage, setMode, setPersonalBest, setPlayable, setPuzzle, setPuzzleID, setPuzzleName, setSaved, setShowIndices, setSolutionData, setSolutionID, setSolutionInformation, setUserID, setVisibleSources, startTimer, stopTimer, stringToPuzzleData, submit, toggleSelected, tryItResultsAreBinding, tutorialModeEnabled, undo, uniqueIdentifier, update, updateStateBasedOnAlgorithmResult, updateTimeTaken, usesAlgorithms
public EdgeChooseInstance()
public EdgeChooseInstance(EdgeChooseInstance spi)
public boolean isChosenEdge(Edge e)
e
- The edge to checkpublic void unchooseAllEdges()
public java.util.ArrayList<Edge> unchooseEdges(java.util.List<Edge> edges)
edges
- The list to check for tree edgespublic boolean unchooseEdge(Edge e)
e
- The edge to removepublic boolean chooseEdge(Edge e)
e
- The edge to be passed into addTreeEdgespublic java.util.ArrayList<Edge> chooseEdges(java.util.List<Edge> edges)
edges
- The list to checkpublic void setVisited(java.util.ArrayList<Edge> edges)
edges
- The edges to set visitedpublic void setUnvisited(java.util.ArrayList<Edge> edges)
edges
- The edges to set visitedpublic boolean isVisited(Vertex v)
v
- The vertex to checkpublic int getNumberVisited()