CSP_rep - Note that these methods are to be implemented at...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
package CSP; /** * Title: CSP_rep * Description: Define subclass to represent a specific kind of CSP. * Copyright: Copyright (c) 2005 * Company: MIT * @author Andreas Hofmann * @version 1.0 */ import java.util.*; /* A CSP is represented by a set of variables, a domain for the variables, and a set of constraints. Thus, the CSP_rep class has elements variables, domain, and constraints. The class also has constructor, initialize, and print methods, which must be overridden in a class that inherits from CSP_rep. Finally, the class has methods backtrack, and backtrack_fc. You will implement the method backtrack in problem 6.3, and the method backtrack_fc in problem 6.4.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Note that these methods are to be implemented at the level of the CSP abstraction, in terms of the classes CSP_rep, CSP_Variable, CSP_Domain, and CSP_Constraint. The implementation of these methods should not contain code specific to a particular type of CSP, such as N-queens. */ public class CSP_rep { List variables; CSP_Domain domain; List constraints; boolean debug_print = false; public CSP_rep() { } public void initialize() { } public void print() { } public boolean backtrack() { // Please implement this method for problem 6.3. } public boolean backtrack_fc() { // Please implement this method for problem 6.4. } }...
View Full Document

This note was uploaded on 11/07/2011 for the course AERO 16.410 taught by Professor Brianwilliams during the Fall '05 term at MIT.

Page1 / 2

CSP_rep - Note that these methods are to be implemented at...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online