Package memory.structure

Examples of memory.structure.Operation


        for (int v = 0; v < vars.length; v++) {
            vindices[v] = vars[v].link(this, v);
        }
        ID = solver.nextId();
        operations = new Operation[]{
                new Operation() {
                    @Override
                    public void undo() {
                        state = NEW;
                    }
                },
                new Operation() {
                    @Override
                    public void undo() {
                        state = REIFIED;
                    }
                },
                new Operation() {
                    @Override
                    public void undo() {
                        state = ACTIVE;
                    }
                }
View Full Code Here


            LOGGER.debug("post " + c.toString());
        }
        solver.postTemp(c);
        // the constraint has been added during the resolution.
        // it should be removed on backtrack -> create a new undo operation
        solver.getEnvironment().save(new Operation() {
            @Override
            public void undo() {
                if (LOGGER.isDebugEnabled()) {
                    LOGGER.debug("unpost " + c.toString());
                }
View Full Code Here

                }
                if (s == Sort.detect) {
                    IEnvironment environment = solver.getEnvironment();
                    if (isDsc) {
                        s = Sort.desc;
                        environment.save(new Operation() {
                            @Override
                            public void undo() {
                                s = Sort.detect;
                            }
                        });
                    } else if (isAsc) {
                        s = Sort.asc;
                        environment.save(new Operation() {
                            @Override
                            public void undo() {
                                s = Sort.detect;
                            }
                        });
                    } else {
                        s = Sort.none;
                        environment.save(new Operation() {
                            @Override
                            public void undo() {
                                s = Sort.detect;
                            }
                        });
View Full Code Here

    @Override
    public void init() throws ContradictionException {
        gAtDec = new GenerateAndTestDecision(vars);
        gAtPE = new GenerateAndTestPropagationEngine(solver);
        final IPropagationEngine stdEngine = solver.getEngine();
        restorePropagationEngine = new Operation() {
            @Override
            public void undo() {
                solver.set(stdEngine);
            }
        };
View Full Code Here

TOP

Related Classes of memory.structure.Operation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.