Package aima.core.search.csp

Examples of aima.core.search.csp.Domain


      case 0:
        csp = new MapCSP();
        break;
      case 1: // three moves
        csp = new MapCSP();
        csp.setDomain(MapCSP.NSW, new Domain(new Object[]{MapCSP.BLUE}));
        break;
      case 2: // three moves
        csp = new MapCSP();
        csp.setDomain(MapCSP.WA, new Domain(new Object[]{MapCSP.RED}));
        break;
      }
      view.clearMappings();
      view.setPositionMapping(MapCSP.WA, 5, 10);
      view.setPositionMapping(MapCSP.NT, 15, 3);
View Full Code Here


  public void setUp() {
    variables = new ArrayList<Variable>();
    variables.add(X);
    variables.add(Y);
    variables.add(Z);
    colors = new Domain(new Object[] { "red", "green", "blue" });
    animals = new Domain(new Object[] { "cat", "dog" });
  }
View Full Code Here

    Assert.assertEquals(0, csp.getConstraints(Z).size());
  }

  @Test
  public void testDomainChanges() {
    Domain colors2 = new Domain(colors.asList());
    Assert.assertEquals(colors, colors2);

    CSP csp = new CSP(variables);
    csp.addConstraint(C1);
    Assert.assertNotNull(csp.getDomain(X));
View Full Code Here

TOP

Related Classes of aima.core.search.csp.Domain

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.