当前位置: 首页>>代码示例>>Java>>正文


Java IOrder类代码示例

本文整理汇总了Java中org.sat4j.minisat.core.IOrder的典型用法代码示例。如果您正苦于以下问题:Java IOrder类的具体用法?Java IOrder怎么用?Java IOrder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IOrder类属于org.sat4j.minisat.core包,在下文中一共展示了IOrder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: test

import org.sat4j.minisat.core.IOrder; //导入依赖的package包/类
@Test
public void test() throws ContradictionException, TimeoutException {
    Solver<DataStructureFactory> solver = SolverFactory.newGlucose();
    int[] backdoor = { 1, 2, 3 };
    IOrder order = new SubsetVarOrder(backdoor);
    solver.setOrder(order);
    IVecInt clause = new VecInt();
    clause.push(1).push(4);
    solver.addClause(clause);
    clause = new VecInt();
    clause.push(2).push(5);
    solver.addClause(clause);
    clause = new VecInt();
    clause.push(3).push(6);
    solver.addClause(clause);
    assertTrue(solver.isSatisfiable());
}
 
开发者ID:TakehideSoh,项目名称:Scarab,代码行数:18,代码来源:BugSAT50.java

示例2: test2

import org.sat4j.minisat.core.IOrder; //导入依赖的package包/类
@Test
public void test2() throws ContradictionException, TimeoutException {
    Solver<DataStructureFactory> solver = SolverFactory.newGlucose();
    int[] backdoor = { 1, 2, 3 };
    IOrder order = new SubsetVarOrder(backdoor);
    solver.setOrder(order);
    IVecInt clause = new VecInt();
    clause.push(-1).push(4);
    solver.addClause(clause);
    clause = new VecInt();
    clause.push(-2).push(5);
    solver.addClause(clause);
    clause = new VecInt();
    clause.push(-3).push(6);
    solver.addClause(clause);
    assertTrue(solver.isSatisfiable());
}
 
开发者ID:TakehideSoh,项目名称:Scarab,代码行数:18,代码来源:BugSAT50.java

示例3: test3

import org.sat4j.minisat.core.IOrder; //导入依赖的package包/类
@Test(expected = TimeoutException.class)
public void test3() throws ContradictionException, TimeoutException {
    Solver<DataStructureFactory> solver = SolverFactory.newGlucose();
    solver.setSearchListener(new TextOutputTracing<Object>(null));
    int[] backdoor = { 1, 2, 3 };
    IOrder order = new SubsetVarOrder(backdoor);
    solver.setOrder(order);
    IVecInt clause = new VecInt();
    clause.push(-1).push(4).push(7);
    solver.addClause(clause);
    clause = new VecInt();
    clause.push(-2).push(5).push(7);
    solver.addClause(clause);
    clause = new VecInt();
    clause.push(-3).push(6).push(5);
    solver.addClause(clause);
    clause = new VecInt();
    clause.push(1).push(2).push(3).push(7).push(8);
    solver.addClause(clause);
    solver.isSatisfiable();
}
 
开发者ID:TakehideSoh,项目名称:Scarab,代码行数:22,代码来源:BugSAT50.java

示例4: testJeanGuy1

import org.sat4j.minisat.core.IOrder; //导入依赖的package包/类
@Test
public void testJeanGuy1() throws ContradictionException, TimeoutException {
    Solver<DataStructureFactory> solver = SolverFactory.newGlucose();
    int[] backdoor = { 1, 2, 3, 4 };
    IOrder order = new SubsetVarOrder(backdoor);
    solver.setOrder(order);
    IVecInt clause = new VecInt();
    clause.push(-1).push(5);
    solver.addClause(clause);
    clause = new VecInt();
    clause.push(-2).push(3).push(5);
    solver.addClause(clause);
    clause = new VecInt();
    clause.push(-4).push(5);
    solver.addClause(clause);
    assertTrue(solver.isSatisfiable());
}
 
开发者ID:TakehideSoh,项目名称:Scarab,代码行数:18,代码来源:BugSAT50.java

示例5: testJeanGuy2

import org.sat4j.minisat.core.IOrder; //导入依赖的package包/类
@Test
public void testJeanGuy2() throws ContradictionException, TimeoutException {
    Solver<DataStructureFactory> solver = SolverFactory.newGlucose();
    int[] backdoor = { 5 };
    IOrder order = new SubsetVarOrder(backdoor);
    solver.setOrder(order);
    IVecInt clause = new VecInt();
    clause.push(-1).push(5);
    solver.addClause(clause);
    clause = new VecInt();
    clause.push(-2).push(3).push(5);
    solver.addClause(clause);
    clause = new VecInt();
    clause.push(-4).push(5);
    solver.addClause(clause);
    assertTrue(solver.isSatisfiable());
}
 
开发者ID:TakehideSoh,项目名称:Scarab,代码行数:18,代码来源:BugSAT50.java

示例6: newPBCP

import org.sat4j.minisat.core.IOrder; //导入依赖的package包/类
private static PBSolverCP newPBCP(PBDataStructureFactory dsf, IOrder order,
        boolean noRemove) {
    MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
    PBSolverCP solver = new PBSolverCP(learning, dsf, order, noRemove);
    learning.setDataStructureFactory(solver.getDSFactory());
    learning.setVarActivityListener(solver);
    solver.setRestartStrategy(new ArminRestarts());
    solver.setLearnedConstraintsDeletionStrategy(solver.lbd_based);
    return solver;
}
 
开发者ID:TakehideSoh,项目名称:Scarab,代码行数:11,代码来源:SolverFactory.java

示例7: newPBCPStar

import org.sat4j.minisat.core.IOrder; //导入依赖的package包/类
private static PBSolverCP newPBCPStar(PBDataStructureFactory dsf,
        IOrder order, boolean noRemove) {
    MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
    PBSolverCP solver = new PBSolverCPLong(learning, dsf, order, noRemove);
    // PBSolverCP solver = new PBSolverCautious(learning, dsf, order,
    // PBSolverCautious.BOUND);
    learning.setDataStructureFactory(solver.getDSFactory());
    learning.setVarActivityListener(solver);
    solver.setRestartStrategy(new ArminRestarts());
    solver.setLearnedConstraintsDeletionStrategy(solver.lbd_based);
    return solver;
}
 
开发者ID:TakehideSoh,项目名称:Scarab,代码行数:13,代码来源:SolverFactory.java

示例8: newPBCPStarReduceToCard

import org.sat4j.minisat.core.IOrder; //导入依赖的package包/类
private static PBSolverCP newPBCPStarReduceToCard(
        PBDataStructureFactory dsf, IOrder order, boolean noRemove) {
    MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
    PBSolverCP solver = new PBSolverCPLongReduceToCard(learning, dsf,
            order, noRemove);
    learning.setDataStructureFactory(solver.getDSFactory());
    learning.setVarActivityListener(solver);
    solver.setRestartStrategy(new ArminRestarts());
    solver.setLearnedConstraintsDeletionStrategy(solver.lbd_based);
    return solver;
}
 
开发者ID:TakehideSoh,项目名称:Scarab,代码行数:12,代码来源:SolverFactory.java

示例9: InprocCardConstrLearningSolver

import org.sat4j.minisat.core.IOrder; //导入依赖的package包/类
public InprocCardConstrLearningSolver(
        LearningStrategy<PBDataStructureFactory> learner,
        PBDataStructureFactory dsf, IOrder order, boolean noRemove) {
    super(learner, dsf, order, noRemove);
    this.coSolver = SolverFactory.newResolution();
    this.cardFinder = new CardConstrFinder(this.coSolver);
    configureSolver();
}
 
开发者ID:TakehideSoh,项目名称:Scarab,代码行数:9,代码来源:InprocCardConstrLearningSolver.java

示例10: PBSolverCPLongReduceToCard

import org.sat4j.minisat.core.IOrder; //导入依赖的package包/类
public PBSolverCPLongReduceToCard(
        LearningStrategy<PBDataStructureFactory> learner,
        PBDataStructureFactory dsf, SearchParams params, IOrder order,
        RestartStrategy restarter) {
    super(learner, dsf, params, order, restarter);
    // TODO Auto-generated constructor stub
}
 
开发者ID:TakehideSoh,项目名称:Scarab,代码行数:8,代码来源:PBSolverCPLongReduceToCard.java

示例11: PBSolver

import org.sat4j.minisat.core.IOrder; //导入依赖的package包/类
public PBSolver(LearningStrategy<PBDataStructureFactory> learner,
        PBDataStructureFactory dsf, SearchParams params, IOrder order,
        RestartStrategy restarter) {
    super(learner, dsf, params, order, restarter);
    this.stats = new PBSolverStats();
    initStats(this.stats);
}
 
开发者ID:TakehideSoh,项目名称:Scarab,代码行数:8,代码来源:PBSolver.java

示例12: setObjectiveFunction

import org.sat4j.minisat.core.IOrder; //导入依赖的package包/类
public void setObjectiveFunction(ObjectiveFunction obj) {
    this.objf = obj;
    IOrder order = getOrder();
    if (order instanceof IOrderObjective) {
        ((IOrderObjective) order).setObjectiveFunction(obj);
    }
    // register literals only visible in the objective function (see
    // SAT-130)
    if (obj != null) {
        dimacs2internal(obj.getVars());
    }
}
 
开发者ID:TakehideSoh,项目名称:Scarab,代码行数:13,代码来源:PBSolver.java

示例13: setOrder

import org.sat4j.minisat.core.IOrder; //导入依赖的package包/类
public void setOrder(IOrder order) {
	this.order = order;
}
 
开发者ID:axel-halin,项目名称:Thesis-JHipster,代码行数:4,代码来源:ActiveLearning.java

示例14: RandomWalkDecorator

import org.sat4j.minisat.core.IOrder; //导入依赖的package包/类
public RandomWalkDecorator(IOrder order) {
	this(order, 0.01);
}
 
开发者ID:axel-halin,项目名称:Thesis-JHipster,代码行数:4,代码来源:RandomWalkDecorator.java

示例15: setVariableOrderObject

import org.sat4j.minisat.core.IOrder; //导入依赖的package包/类
public void setVariableOrderObject(IOrder order) {
	((Solver)satSolver).setOrder(order);
}
 
开发者ID:axel-halin,项目名称:Thesis-JHipster,代码行数:4,代码来源:ReasoningWithSAT.java


注:本文中的org.sat4j.minisat.core.IOrder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。