1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
---|
2 | <!--NewPage--> |
---|
3 | <HTML> |
---|
4 | <HEAD> |
---|
5 | <!-- Generated by javadoc (build 1.6.0_07) on Tue Sep 01 20:56:58 UTC 2009 --> |
---|
6 | <TITLE> |
---|
7 | Pentomino (Hadoop 0.20.1 API) |
---|
8 | </TITLE> |
---|
9 | |
---|
10 | <META NAME="date" CONTENT="2009-09-01"> |
---|
11 | |
---|
12 | <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> |
---|
13 | |
---|
14 | <SCRIPT type="text/javascript"> |
---|
15 | function windowTitle() |
---|
16 | { |
---|
17 | if (location.href.indexOf('is-external=true') == -1) { |
---|
18 | parent.document.title="Pentomino (Hadoop 0.20.1 API)"; |
---|
19 | } |
---|
20 | } |
---|
21 | </SCRIPT> |
---|
22 | <NOSCRIPT> |
---|
23 | </NOSCRIPT> |
---|
24 | |
---|
25 | </HEAD> |
---|
26 | |
---|
27 | <BODY BGCOLOR="white" onload="windowTitle();"> |
---|
28 | <HR> |
---|
29 | |
---|
30 | |
---|
31 | <!-- ========= START OF TOP NAVBAR ======= --> |
---|
32 | <A NAME="navbar_top"><!-- --></A> |
---|
33 | <A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
---|
34 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
---|
35 | <TR> |
---|
36 | <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
---|
37 | <A NAME="navbar_top_firstrow"><!-- --></A> |
---|
38 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
---|
39 | <TR ALIGN="center" VALIGN="top"> |
---|
40 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
---|
41 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
42 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
43 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Pentomino.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
---|
44 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
45 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
46 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
---|
47 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
---|
48 | </TR> |
---|
49 | </TABLE> |
---|
50 | </TD> |
---|
51 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
---|
52 | </EM> |
---|
53 | </TD> |
---|
54 | </TR> |
---|
55 | |
---|
56 | <TR> |
---|
57 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
58 | <A HREF="../../../../../org/apache/hadoop/examples/dancing/OneSidedPentomino.html" title="class in org.apache.hadoop.examples.dancing"><B>PREV CLASS</B></A> |
---|
59 | <A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.ColumnName.html" title="interface in org.apache.hadoop.examples.dancing"><B>NEXT CLASS</B></A></FONT></TD> |
---|
60 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
61 | <A HREF="../../../../../index.html?org/apache/hadoop/examples/dancing/Pentomino.html" target="_top"><B>FRAMES</B></A> |
---|
62 | <A HREF="Pentomino.html" target="_top"><B>NO FRAMES</B></A> |
---|
63 | <SCRIPT type="text/javascript"> |
---|
64 | <!-- |
---|
65 | if(window==top) { |
---|
66 | document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
---|
67 | } |
---|
68 | //--> |
---|
69 | </SCRIPT> |
---|
70 | <NOSCRIPT> |
---|
71 | <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> |
---|
72 | </NOSCRIPT> |
---|
73 | |
---|
74 | |
---|
75 | </FONT></TD> |
---|
76 | </TR> |
---|
77 | <TR> |
---|
78 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
79 | SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
80 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
81 | DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
---|
82 | </TR> |
---|
83 | </TABLE> |
---|
84 | <A NAME="skip-navbar_top"></A> |
---|
85 | <!-- ========= END OF TOP NAVBAR ========= --> |
---|
86 | |
---|
87 | <HR> |
---|
88 | <!-- ======== START OF CLASS DATA ======== --> |
---|
89 | <H2> |
---|
90 | <FONT SIZE="-1"> |
---|
91 | org.apache.hadoop.examples.dancing</FONT> |
---|
92 | <BR> |
---|
93 | Class Pentomino</H2> |
---|
94 | <PRE> |
---|
95 | <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A> |
---|
96 | <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.hadoop.examples.dancing.Pentomino</B> |
---|
97 | </PRE> |
---|
98 | <DL> |
---|
99 | <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/hadoop/examples/dancing/OneSidedPentomino.html" title="class in org.apache.hadoop.examples.dancing">OneSidedPentomino</A></DD> |
---|
100 | </DL> |
---|
101 | <HR> |
---|
102 | <DL> |
---|
103 | <DT><PRE>public class <B>Pentomino</B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL> |
---|
104 | </PRE> |
---|
105 | |
---|
106 | <P> |
---|
107 | <HR> |
---|
108 | |
---|
109 | <P> |
---|
110 | <!-- ======== NESTED CLASS SUMMARY ======== --> |
---|
111 | |
---|
112 | <A NAME="nested_class_summary"><!-- --></A> |
---|
113 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
114 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
115 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
116 | <B>Nested Class Summary</B></FONT></TH> |
---|
117 | </TR> |
---|
118 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
119 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
120 | <CODE>protected static interface</CODE></FONT></TD> |
---|
121 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.ColumnName.html" title="interface in org.apache.hadoop.examples.dancing">Pentomino.ColumnName</A></B></CODE> |
---|
122 | |
---|
123 | <BR> |
---|
124 | This interface just is a marker for what types I expect to get back |
---|
125 | as column names.</TD> |
---|
126 | </TR> |
---|
127 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
128 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
129 | <CODE>protected static class</CODE></FONT></TD> |
---|
130 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.Piece.html" title="class in org.apache.hadoop.examples.dancing">Pentomino.Piece</A></B></CODE> |
---|
131 | |
---|
132 | <BR> |
---|
133 | Maintain information about a puzzle piece.</TD> |
---|
134 | </TR> |
---|
135 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
136 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
137 | <CODE>static class</CODE></FONT></TD> |
---|
138 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.SolutionCategory.html" title="enum in org.apache.hadoop.examples.dancing">Pentomino.SolutionCategory</A></B></CODE> |
---|
139 | |
---|
140 | <BR> |
---|
141 | </TD> |
---|
142 | </TR> |
---|
143 | </TABLE> |
---|
144 | <!-- =========== FIELD SUMMARY =========== --> |
---|
145 | |
---|
146 | <A NAME="field_summary"><!-- --></A> |
---|
147 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
148 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
149 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
150 | <B>Field Summary</B></FONT></TH> |
---|
151 | </TR> |
---|
152 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
153 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
154 | <CODE>protected static int[]</CODE></FONT></TD> |
---|
155 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.html#fourRotations">fourRotations</A></B></CODE> |
---|
156 | |
---|
157 | <BR> |
---|
158 | Are all 4 rotations unique?</TD> |
---|
159 | </TR> |
---|
160 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
161 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
162 | <CODE>protected int</CODE></FONT></TD> |
---|
163 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.html#height">height</A></B></CODE> |
---|
164 | |
---|
165 | <BR> |
---|
166 | </TD> |
---|
167 | </TR> |
---|
168 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
169 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
170 | <CODE>protected static int[]</CODE></FONT></TD> |
---|
171 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.html#oneRotation">oneRotation</A></B></CODE> |
---|
172 | |
---|
173 | <BR> |
---|
174 | Is the piece fixed under rotation?</TD> |
---|
175 | </TR> |
---|
176 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
177 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
178 | <CODE>protected <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.Piece.html" title="class in org.apache.hadoop.examples.dancing">Pentomino.Piece</A>></CODE></FONT></TD> |
---|
179 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.html#pieces">pieces</A></B></CODE> |
---|
180 | |
---|
181 | <BR> |
---|
182 | </TD> |
---|
183 | </TR> |
---|
184 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
185 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
186 | <CODE>protected static int[]</CODE></FONT></TD> |
---|
187 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.html#twoRotations">twoRotations</A></B></CODE> |
---|
188 | |
---|
189 | <BR> |
---|
190 | Is the piece identical if rotated 180 degrees?</TD> |
---|
191 | </TR> |
---|
192 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
193 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
194 | <CODE>protected int</CODE></FONT></TD> |
---|
195 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.html#width">width</A></B></CODE> |
---|
196 | |
---|
197 | <BR> |
---|
198 | </TD> |
---|
199 | </TR> |
---|
200 | </TABLE> |
---|
201 | |
---|
202 | <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
---|
203 | |
---|
204 | <A NAME="constructor_summary"><!-- --></A> |
---|
205 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
206 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
207 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
208 | <B>Constructor Summary</B></FONT></TH> |
---|
209 | </TR> |
---|
210 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
211 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.html#Pentomino()">Pentomino</A></B>()</CODE> |
---|
212 | |
---|
213 | <BR> |
---|
214 | Create the object without initialization.</TD> |
---|
215 | </TR> |
---|
216 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
217 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.html#Pentomino(int, int)">Pentomino</A></B>(int width, |
---|
218 | int height)</CODE> |
---|
219 | |
---|
220 | <BR> |
---|
221 | Create the model for a given pentomino set of pieces and board size.</TD> |
---|
222 | </TR> |
---|
223 | </TABLE> |
---|
224 | |
---|
225 | <!-- ========== METHOD SUMMARY =========== --> |
---|
226 | |
---|
227 | <A NAME="method_summary"><!-- --></A> |
---|
228 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
229 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
230 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
231 | <B>Method Summary</B></FONT></TH> |
---|
232 | </TR> |
---|
233 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
234 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
235 | <CODE> <A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.SolutionCategory.html" title="enum in org.apache.hadoop.examples.dancing">Pentomino.SolutionCategory</A></CODE></FONT></TD> |
---|
236 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.html#getCategory(java.util.List)">getCategory</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.ColumnName.html" title="interface in org.apache.hadoop.examples.dancing">Pentomino.ColumnName</A>>> names)</CODE> |
---|
237 | |
---|
238 | <BR> |
---|
239 | Find whether the solution has the x in the upper left quadrant, the |
---|
240 | x-midline, the y-midline or in the center.</TD> |
---|
241 | </TR> |
---|
242 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
243 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
244 | <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><int[]></CODE></FONT></TD> |
---|
245 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.html#getSplits(int)">getSplits</A></B>(int depth)</CODE> |
---|
246 | |
---|
247 | <BR> |
---|
248 | Generate a list of prefixes to a given depth</TD> |
---|
249 | </TR> |
---|
250 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
251 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
252 | <CODE>protected void</CODE></FONT></TD> |
---|
253 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.html#initializePieces()">initializePieces</A></B>()</CODE> |
---|
254 | |
---|
255 | <BR> |
---|
256 | Fill in the pieces list.</TD> |
---|
257 | </TR> |
---|
258 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
259 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
260 | <CODE>static void</CODE></FONT></TD> |
---|
261 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.html#main(java.lang.String[])">main</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[] args)</CODE> |
---|
262 | |
---|
263 | <BR> |
---|
264 | Solve the 6x10 pentomino puzzle.</TD> |
---|
265 | </TR> |
---|
266 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
267 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
268 | <CODE> void</CODE></FONT></TD> |
---|
269 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.html#setPrinter(org.apache.hadoop.examples.dancing.DancingLinks.SolutionAcceptor)">setPrinter</A></B>(<A HREF="../../../../../org/apache/hadoop/examples/dancing/DancingLinks.SolutionAcceptor.html" title="interface in org.apache.hadoop.examples.dancing">DancingLinks.SolutionAcceptor</A><<A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.ColumnName.html" title="interface in org.apache.hadoop.examples.dancing">Pentomino.ColumnName</A>> printer)</CODE> |
---|
270 | |
---|
271 | <BR> |
---|
272 | Set the printer for the puzzle.</TD> |
---|
273 | </TR> |
---|
274 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
275 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
276 | <CODE> int</CODE></FONT></TD> |
---|
277 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.html#solve()">solve</A></B>()</CODE> |
---|
278 | |
---|
279 | <BR> |
---|
280 | Find all of the solutions to the puzzle.</TD> |
---|
281 | </TR> |
---|
282 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
283 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
284 | <CODE> int</CODE></FONT></TD> |
---|
285 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.html#solve(int[])">solve</A></B>(int[] split)</CODE> |
---|
286 | |
---|
287 | <BR> |
---|
288 | Find all of the solutions that start with the given prefix.</TD> |
---|
289 | </TR> |
---|
290 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
291 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
292 | <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
---|
293 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.html#stringifySolution(int, int, java.util.List)">stringifySolution</A></B>(int width, |
---|
294 | int height, |
---|
295 | <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.ColumnName.html" title="interface in org.apache.hadoop.examples.dancing">Pentomino.ColumnName</A>>> solution)</CODE> |
---|
296 | |
---|
297 | <BR> |
---|
298 | Convert a solution to the puzzle returned by the model into a string |
---|
299 | that represents the placement of the pieces onto the board.</TD> |
---|
300 | </TR> |
---|
301 | </TABLE> |
---|
302 | <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
---|
303 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
304 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
---|
305 | <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH> |
---|
306 | </TR> |
---|
307 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
308 | <TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> |
---|
309 | </TR> |
---|
310 | </TABLE> |
---|
311 | |
---|
312 | <P> |
---|
313 | |
---|
314 | <!-- ============ FIELD DETAIL =========== --> |
---|
315 | |
---|
316 | <A NAME="field_detail"><!-- --></A> |
---|
317 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
318 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
319 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
320 | <B>Field Detail</B></FONT></TH> |
---|
321 | </TR> |
---|
322 | </TABLE> |
---|
323 | |
---|
324 | <A NAME="width"><!-- --></A><H3> |
---|
325 | width</H3> |
---|
326 | <PRE> |
---|
327 | protected int <B>width</B></PRE> |
---|
328 | <DL> |
---|
329 | <DL> |
---|
330 | </DL> |
---|
331 | </DL> |
---|
332 | <HR> |
---|
333 | |
---|
334 | <A NAME="height"><!-- --></A><H3> |
---|
335 | height</H3> |
---|
336 | <PRE> |
---|
337 | protected int <B>height</B></PRE> |
---|
338 | <DL> |
---|
339 | <DL> |
---|
340 | </DL> |
---|
341 | </DL> |
---|
342 | <HR> |
---|
343 | |
---|
344 | <A NAME="pieces"><!-- --></A><H3> |
---|
345 | pieces</H3> |
---|
346 | <PRE> |
---|
347 | protected <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.Piece.html" title="class in org.apache.hadoop.examples.dancing">Pentomino.Piece</A>> <B>pieces</B></PRE> |
---|
348 | <DL> |
---|
349 | <DL> |
---|
350 | </DL> |
---|
351 | </DL> |
---|
352 | <HR> |
---|
353 | |
---|
354 | <A NAME="oneRotation"><!-- --></A><H3> |
---|
355 | oneRotation</H3> |
---|
356 | <PRE> |
---|
357 | protected static final int[] <B>oneRotation</B></PRE> |
---|
358 | <DL> |
---|
359 | <DD>Is the piece fixed under rotation? |
---|
360 | <P> |
---|
361 | <DL> |
---|
362 | </DL> |
---|
363 | </DL> |
---|
364 | <HR> |
---|
365 | |
---|
366 | <A NAME="twoRotations"><!-- --></A><H3> |
---|
367 | twoRotations</H3> |
---|
368 | <PRE> |
---|
369 | protected static final int[] <B>twoRotations</B></PRE> |
---|
370 | <DL> |
---|
371 | <DD>Is the piece identical if rotated 180 degrees? |
---|
372 | <P> |
---|
373 | <DL> |
---|
374 | </DL> |
---|
375 | </DL> |
---|
376 | <HR> |
---|
377 | |
---|
378 | <A NAME="fourRotations"><!-- --></A><H3> |
---|
379 | fourRotations</H3> |
---|
380 | <PRE> |
---|
381 | protected static final int[] <B>fourRotations</B></PRE> |
---|
382 | <DL> |
---|
383 | <DD>Are all 4 rotations unique? |
---|
384 | <P> |
---|
385 | <DL> |
---|
386 | </DL> |
---|
387 | </DL> |
---|
388 | |
---|
389 | <!-- ========= CONSTRUCTOR DETAIL ======== --> |
---|
390 | |
---|
391 | <A NAME="constructor_detail"><!-- --></A> |
---|
392 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
393 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
394 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
395 | <B>Constructor Detail</B></FONT></TH> |
---|
396 | </TR> |
---|
397 | </TABLE> |
---|
398 | |
---|
399 | <A NAME="Pentomino(int, int)"><!-- --></A><H3> |
---|
400 | Pentomino</H3> |
---|
401 | <PRE> |
---|
402 | public <B>Pentomino</B>(int width, |
---|
403 | int height)</PRE> |
---|
404 | <DL> |
---|
405 | <DD>Create the model for a given pentomino set of pieces and board size. |
---|
406 | <P> |
---|
407 | <DL> |
---|
408 | <DT><B>Parameters:</B><DD><CODE>width</CODE> - the width of the board in squares<DD><CODE>height</CODE> - the height of the board in squares</DL> |
---|
409 | </DL> |
---|
410 | <HR> |
---|
411 | |
---|
412 | <A NAME="Pentomino()"><!-- --></A><H3> |
---|
413 | Pentomino</H3> |
---|
414 | <PRE> |
---|
415 | public <B>Pentomino</B>()</PRE> |
---|
416 | <DL> |
---|
417 | <DD>Create the object without initialization. |
---|
418 | <P> |
---|
419 | </DL> |
---|
420 | |
---|
421 | <!-- ============ METHOD DETAIL ========== --> |
---|
422 | |
---|
423 | <A NAME="method_detail"><!-- --></A> |
---|
424 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
425 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
426 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
427 | <B>Method Detail</B></FONT></TH> |
---|
428 | </TR> |
---|
429 | </TABLE> |
---|
430 | |
---|
431 | <A NAME="stringifySolution(int, int, java.util.List)"><!-- --></A><H3> |
---|
432 | stringifySolution</H3> |
---|
433 | <PRE> |
---|
434 | public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>stringifySolution</B>(int width, |
---|
435 | int height, |
---|
436 | <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.ColumnName.html" title="interface in org.apache.hadoop.examples.dancing">Pentomino.ColumnName</A>>> solution)</PRE> |
---|
437 | <DL> |
---|
438 | <DD>Convert a solution to the puzzle returned by the model into a string |
---|
439 | that represents the placement of the pieces onto the board. |
---|
440 | <P> |
---|
441 | <DD><DL> |
---|
442 | <DT><B>Parameters:</B><DD><CODE>width</CODE> - the width of the puzzle board<DD><CODE>height</CODE> - the height of the puzzle board<DD><CODE>solution</CODE> - the list of column names that were selected in the model |
---|
443 | <DT><B>Returns:</B><DD>a string representation of completed puzzle board</DL> |
---|
444 | </DD> |
---|
445 | </DL> |
---|
446 | <HR> |
---|
447 | |
---|
448 | <A NAME="getCategory(java.util.List)"><!-- --></A><H3> |
---|
449 | getCategory</H3> |
---|
450 | <PRE> |
---|
451 | public <A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.SolutionCategory.html" title="enum in org.apache.hadoop.examples.dancing">Pentomino.SolutionCategory</A> <B>getCategory</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.ColumnName.html" title="interface in org.apache.hadoop.examples.dancing">Pentomino.ColumnName</A>>> names)</PRE> |
---|
452 | <DL> |
---|
453 | <DD>Find whether the solution has the x in the upper left quadrant, the |
---|
454 | x-midline, the y-midline or in the center. |
---|
455 | <P> |
---|
456 | <DD><DL> |
---|
457 | <DT><B>Parameters:</B><DD><CODE>names</CODE> - the solution to check |
---|
458 | <DT><B>Returns:</B><DD>the catagory of the solution</DL> |
---|
459 | </DD> |
---|
460 | </DL> |
---|
461 | <HR> |
---|
462 | |
---|
463 | <A NAME="initializePieces()"><!-- --></A><H3> |
---|
464 | initializePieces</H3> |
---|
465 | <PRE> |
---|
466 | protected void <B>initializePieces</B>()</PRE> |
---|
467 | <DL> |
---|
468 | <DD>Fill in the pieces list. |
---|
469 | <P> |
---|
470 | <DD><DL> |
---|
471 | </DL> |
---|
472 | </DD> |
---|
473 | </DL> |
---|
474 | <HR> |
---|
475 | |
---|
476 | <A NAME="getSplits(int)"><!-- --></A><H3> |
---|
477 | getSplits</H3> |
---|
478 | <PRE> |
---|
479 | public <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><int[]> <B>getSplits</B>(int depth)</PRE> |
---|
480 | <DL> |
---|
481 | <DD>Generate a list of prefixes to a given depth |
---|
482 | <P> |
---|
483 | <DD><DL> |
---|
484 | <DT><B>Parameters:</B><DD><CODE>depth</CODE> - the length of each prefix |
---|
485 | <DT><B>Returns:</B><DD>a list of arrays of ints, which are potential prefixes</DL> |
---|
486 | </DD> |
---|
487 | </DL> |
---|
488 | <HR> |
---|
489 | |
---|
490 | <A NAME="solve(int[])"><!-- --></A><H3> |
---|
491 | solve</H3> |
---|
492 | <PRE> |
---|
493 | public int <B>solve</B>(int[] split)</PRE> |
---|
494 | <DL> |
---|
495 | <DD>Find all of the solutions that start with the given prefix. The printer |
---|
496 | is given each solution as it is found. |
---|
497 | <P> |
---|
498 | <DD><DL> |
---|
499 | <DT><B>Parameters:</B><DD><CODE>split</CODE> - a list of row indexes that should be choosen for each row |
---|
500 | in order |
---|
501 | <DT><B>Returns:</B><DD>the number of solutions found</DL> |
---|
502 | </DD> |
---|
503 | </DL> |
---|
504 | <HR> |
---|
505 | |
---|
506 | <A NAME="solve()"><!-- --></A><H3> |
---|
507 | solve</H3> |
---|
508 | <PRE> |
---|
509 | public int <B>solve</B>()</PRE> |
---|
510 | <DL> |
---|
511 | <DD>Find all of the solutions to the puzzle. |
---|
512 | <P> |
---|
513 | <DD><DL> |
---|
514 | |
---|
515 | <DT><B>Returns:</B><DD>the number of solutions found</DL> |
---|
516 | </DD> |
---|
517 | </DL> |
---|
518 | <HR> |
---|
519 | |
---|
520 | <A NAME="setPrinter(org.apache.hadoop.examples.dancing.DancingLinks.SolutionAcceptor)"><!-- --></A><H3> |
---|
521 | setPrinter</H3> |
---|
522 | <PRE> |
---|
523 | public void <B>setPrinter</B>(<A HREF="../../../../../org/apache/hadoop/examples/dancing/DancingLinks.SolutionAcceptor.html" title="interface in org.apache.hadoop.examples.dancing">DancingLinks.SolutionAcceptor</A><<A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.ColumnName.html" title="interface in org.apache.hadoop.examples.dancing">Pentomino.ColumnName</A>> printer)</PRE> |
---|
524 | <DL> |
---|
525 | <DD>Set the printer for the puzzle. |
---|
526 | <P> |
---|
527 | <DD><DL> |
---|
528 | <DT><B>Parameters:</B><DD><CODE>printer</CODE> - A call-back object that is given each solution as it is |
---|
529 | found.</DL> |
---|
530 | </DD> |
---|
531 | </DL> |
---|
532 | <HR> |
---|
533 | |
---|
534 | <A NAME="main(java.lang.String[])"><!-- --></A><H3> |
---|
535 | main</H3> |
---|
536 | <PRE> |
---|
537 | public static void <B>main</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[] args)</PRE> |
---|
538 | <DL> |
---|
539 | <DD>Solve the 6x10 pentomino puzzle. |
---|
540 | <P> |
---|
541 | <DD><DL> |
---|
542 | </DL> |
---|
543 | </DD> |
---|
544 | </DL> |
---|
545 | <!-- ========= END OF CLASS DATA ========= --> |
---|
546 | <HR> |
---|
547 | |
---|
548 | |
---|
549 | <!-- ======= START OF BOTTOM NAVBAR ====== --> |
---|
550 | <A NAME="navbar_bottom"><!-- --></A> |
---|
551 | <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
---|
552 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
---|
553 | <TR> |
---|
554 | <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
---|
555 | <A NAME="navbar_bottom_firstrow"><!-- --></A> |
---|
556 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
---|
557 | <TR ALIGN="center" VALIGN="top"> |
---|
558 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
---|
559 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
560 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
561 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Pentomino.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
---|
562 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
563 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
564 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
---|
565 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
---|
566 | </TR> |
---|
567 | </TABLE> |
---|
568 | </TD> |
---|
569 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
---|
570 | </EM> |
---|
571 | </TD> |
---|
572 | </TR> |
---|
573 | |
---|
574 | <TR> |
---|
575 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
576 | <A HREF="../../../../../org/apache/hadoop/examples/dancing/OneSidedPentomino.html" title="class in org.apache.hadoop.examples.dancing"><B>PREV CLASS</B></A> |
---|
577 | <A HREF="../../../../../org/apache/hadoop/examples/dancing/Pentomino.ColumnName.html" title="interface in org.apache.hadoop.examples.dancing"><B>NEXT CLASS</B></A></FONT></TD> |
---|
578 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
579 | <A HREF="../../../../../index.html?org/apache/hadoop/examples/dancing/Pentomino.html" target="_top"><B>FRAMES</B></A> |
---|
580 | <A HREF="Pentomino.html" target="_top"><B>NO FRAMES</B></A> |
---|
581 | <SCRIPT type="text/javascript"> |
---|
582 | <!-- |
---|
583 | if(window==top) { |
---|
584 | document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
---|
585 | } |
---|
586 | //--> |
---|
587 | </SCRIPT> |
---|
588 | <NOSCRIPT> |
---|
589 | <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> |
---|
590 | </NOSCRIPT> |
---|
591 | |
---|
592 | |
---|
593 | </FONT></TD> |
---|
594 | </TR> |
---|
595 | <TR> |
---|
596 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
597 | SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
598 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
599 | DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
---|
600 | </TR> |
---|
601 | </TABLE> |
---|
602 | <A NAME="skip-navbar_bottom"></A> |
---|
603 | <!-- ======== END OF BOTTOM NAVBAR ======= --> |
---|
604 | |
---|
605 | <HR> |
---|
606 | Copyright © 2009 The Apache Software Foundation |
---|
607 | </BODY> |
---|
608 | </HTML> |
---|