org.chocosolver.solver.variables.DirectedGraphVar Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of choco-solver Show documentation
Show all versions of choco-solver Show documentation
Open-source constraint solver.
/*
* This file is part of choco-solver, http://choco-solver.org/
*
* Copyright (c) 2022, IMT Atlantique. All rights reserved.
*
* Licensed under the BSD 4-clause license.
*
* See LICENSE file in the project root for full license information.
*/
package org.chocosolver.solver.variables;
import org.chocosolver.util.objects.graphs.DirectedGraph;
/**
* Interface defining a directed graph variable
*/
public interface DirectedGraphVar extends GraphVar {
/**
* Retrieves the current value of the variable if instantiated, otherwise the lower bound (kernel).
*
* @return the current value (or kernel if not yet instantiated).
*/
default DirectedGraph getValue(){
assert isInstantiated() : getName() + " not instantiated";
return getLB();
}
@Override
default boolean isDirected() {
return true;
}
}