ConstraintSolver 0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. data/bin/ConstraintSolver +24 -0
  2. data/doc/classes/Array.html +209 -0
  3. data/doc/classes/ConstraintSolver.html +242 -0
  4. data/doc/classes/ConstraintSolver/AbstractConstraint.html +317 -0
  5. data/doc/classes/ConstraintSolver/AllDifferentConstraint.html +451 -0
  6. data/doc/classes/ConstraintSolver/AllDifferentConstraintTest.html +397 -0
  7. data/doc/classes/ConstraintSolver/BinaryConstraint.html +483 -0
  8. data/doc/classes/ConstraintSolver/BinaryConstraintTest.html +367 -0
  9. data/doc/classes/ConstraintSolver/BinaryRelation.html +276 -0
  10. data/doc/classes/ConstraintSolver/BinaryRelationTest.html +194 -0
  11. data/doc/classes/ConstraintSolver/ConstraintList.html +208 -0
  12. data/doc/classes/ConstraintSolver/ConstraintListTest.html +252 -0
  13. data/doc/classes/ConstraintSolver/ConstraintSolver.html +353 -0
  14. data/doc/classes/ConstraintSolver/ConstraintSolverTest.html +403 -0
  15. data/doc/classes/ConstraintSolver/Domain.html +522 -0
  16. data/doc/classes/ConstraintSolver/DomainTest.html +356 -0
  17. data/doc/classes/ConstraintSolver/DomainWipeoutException.html +158 -0
  18. data/doc/classes/ConstraintSolver/Problem.html +239 -0
  19. data/doc/classes/ConstraintSolver/ProblemTest.html +227 -0
  20. data/doc/classes/ConstraintSolver/Solution.html +342 -0
  21. data/doc/classes/ConstraintSolver/SolutionTest.html +250 -0
  22. data/doc/classes/ConstraintSolver/UndoStackEmptyException.html +158 -0
  23. data/doc/classes/ConstraintSolver/Variable.html +418 -0
  24. data/doc/classes/ConstraintSolver/VariableTest.html +284 -0
  25. data/doc/classes/ExtensionsTest.html +233 -0
  26. data/doc/classes/Fixnum.html +153 -0
  27. data/doc/created.rid +1 -0
  28. data/doc/dot/f_0.dot +38 -0
  29. data/doc/dot/f_0.png +0 -0
  30. data/doc/dot/f_1.dot +392 -0
  31. data/doc/dot/f_1.png +0 -0
  32. data/doc/dot/f_10.dot +392 -0
  33. data/doc/dot/f_10.png +0 -0
  34. data/doc/dot/f_11.dot +38 -0
  35. data/doc/dot/f_11.png +0 -0
  36. data/doc/dot/f_12.dot +392 -0
  37. data/doc/dot/f_12.png +0 -0
  38. data/doc/dot/f_13.dot +392 -0
  39. data/doc/dot/f_13.png +0 -0
  40. data/doc/dot/f_14.dot +392 -0
  41. data/doc/dot/f_14.png +0 -0
  42. data/doc/dot/f_15.dot +392 -0
  43. data/doc/dot/f_15.png +0 -0
  44. data/doc/dot/f_16.dot +392 -0
  45. data/doc/dot/f_16.png +0 -0
  46. data/doc/dot/f_17.dot +392 -0
  47. data/doc/dot/f_17.png +0 -0
  48. data/doc/dot/f_18.dot +392 -0
  49. data/doc/dot/f_18.png +0 -0
  50. data/doc/dot/f_19.dot +392 -0
  51. data/doc/dot/f_19.png +0 -0
  52. data/doc/dot/f_2.dot +392 -0
  53. data/doc/dot/f_2.png +0 -0
  54. data/doc/dot/f_3.dot +392 -0
  55. data/doc/dot/f_3.png +0 -0
  56. data/doc/dot/f_4.dot +392 -0
  57. data/doc/dot/f_4.png +0 -0
  58. data/doc/dot/f_5.dot +392 -0
  59. data/doc/dot/f_5.png +0 -0
  60. data/doc/dot/f_6.dot +14 -0
  61. data/doc/dot/f_6.png +0 -0
  62. data/doc/dot/f_7.dot +392 -0
  63. data/doc/dot/f_7.png +0 -0
  64. data/doc/dot/f_8.dot +392 -0
  65. data/doc/dot/f_8.png +0 -0
  66. data/doc/dot/f_9.dot +392 -0
  67. data/doc/dot/f_9.png +0 -0
  68. data/doc/dot/m_10_0.dot +392 -0
  69. data/doc/dot/m_10_0.png +0 -0
  70. data/doc/dot/m_12_0.dot +392 -0
  71. data/doc/dot/m_12_0.png +0 -0
  72. data/doc/dot/m_13_0.dot +392 -0
  73. data/doc/dot/m_13_0.png +0 -0
  74. data/doc/dot/m_14_0.dot +392 -0
  75. data/doc/dot/m_14_0.png +0 -0
  76. data/doc/dot/m_15_0.dot +392 -0
  77. data/doc/dot/m_15_0.png +0 -0
  78. data/doc/dot/m_16_0.dot +392 -0
  79. data/doc/dot/m_16_0.png +0 -0
  80. data/doc/dot/m_17_0.dot +392 -0
  81. data/doc/dot/m_17_0.png +0 -0
  82. data/doc/dot/m_18_0.dot +392 -0
  83. data/doc/dot/m_18_0.png +0 -0
  84. data/doc/dot/m_19_0.dot +392 -0
  85. data/doc/dot/m_19_0.png +0 -0
  86. data/doc/dot/m_1_0.dot +392 -0
  87. data/doc/dot/m_1_0.png +0 -0
  88. data/doc/dot/m_2_0.dot +392 -0
  89. data/doc/dot/m_2_0.png +0 -0
  90. data/doc/dot/m_3_0.dot +392 -0
  91. data/doc/dot/m_3_0.png +0 -0
  92. data/doc/dot/m_4_0.dot +392 -0
  93. data/doc/dot/m_4_0.png +0 -0
  94. data/doc/dot/m_5_0.dot +392 -0
  95. data/doc/dot/m_5_0.png +0 -0
  96. data/doc/dot/m_7_0.dot +392 -0
  97. data/doc/dot/m_7_0.png +0 -0
  98. data/doc/dot/m_8_0.dot +392 -0
  99. data/doc/dot/m_8_0.png +0 -0
  100. data/doc/dot/m_9_0.dot +392 -0
  101. data/doc/dot/m_9_0.png +0 -0
  102. data/doc/files/lib/AbstractConstraint_rb.html +148 -0
  103. data/doc/files/lib/AllDifferentConstraint_rb.html +156 -0
  104. data/doc/files/lib/BinaryConstraint_rb.html +155 -0
  105. data/doc/files/lib/ConstraintList_rb.html +148 -0
  106. data/doc/files/lib/ConstraintSolver_rb.html +162 -0
  107. data/doc/files/lib/Domain_rb.html +155 -0
  108. data/doc/files/lib/Problem_rb.html +148 -0
  109. data/doc/files/lib/Solution_rb.html +148 -0
  110. data/doc/files/lib/Variable_rb.html +148 -0
  111. data/doc/files/lib/extensions_rb.html +108 -0
  112. data/doc/files/test/AllDifferentConstraintTest_rb.html +158 -0
  113. data/doc/files/test/BinaryConstraintTest_rb.html +158 -0
  114. data/doc/files/test/ConstraintListTest_rb.html +160 -0
  115. data/doc/files/test/ConstraintSolverTest_rb.html +164 -0
  116. data/doc/files/test/DomainTest_rb.html +156 -0
  117. data/doc/files/test/ProblemTest_rb.html +160 -0
  118. data/doc/files/test/SolutionTest_rb.html +159 -0
  119. data/doc/files/test/TestSuite_rb.html +113 -0
  120. data/doc/files/test/VariableTest_rb.html +157 -0
  121. data/doc/files/test/extensionsTest_rb.html +118 -0
  122. data/doc/fr_class_index.html +51 -0
  123. data/doc/fr_file_index.html +46 -0
  124. data/doc/fr_method_index.html +133 -0
  125. data/doc/index.html +24 -0
  126. data/examples/example.rb +7 -0
  127. data/examples/queens.rb +13 -0
  128. data/examples/soft.rb +14 -0
  129. data/lib/AbstractConstraint.rb +45 -0
  130. data/lib/AllDifferentConstraint.rb +160 -0
  131. data/lib/BinaryConstraint.rb +187 -0
  132. data/lib/ConstraintList.rb +31 -0
  133. data/lib/ConstraintSolver.rb +213 -0
  134. data/lib/Domain.rb +100 -0
  135. data/lib/GraphUtils.rb +293 -0
  136. data/lib/OneOfEqualsConstraint.rb +81 -0
  137. data/lib/Problem.rb +30 -0
  138. data/lib/Solution.rb +56 -0
  139. data/lib/TupleConstraint.rb +111 -0
  140. data/lib/Variable.rb +74 -0
  141. data/lib/extensions.rb +55 -0
  142. data/test/AllDifferentConstraintTest.rb +140 -0
  143. data/test/BinaryConstraintTest.rb +108 -0
  144. data/test/ConstraintListTest.rb +41 -0
  145. data/test/ConstraintSolverTest.rb +274 -0
  146. data/test/DomainTest.rb +83 -0
  147. data/test/GraphUtilsTest.rb +83 -0
  148. data/test/OneOfEqualsConstraintTest.rb +82 -0
  149. data/test/ProblemTest.rb +35 -0
  150. data/test/SolutionTest.rb +35 -0
  151. data/test/TestSuite.rb +10 -0
  152. data/test/TupleConstraintTest.rb +151 -0
  153. data/test/VariableTest.rb +47 -0
  154. data/test/extensionsTest.rb +57 -0
  155. metadata +212 -0
@@ -0,0 +1,367 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: ConstraintSolver::BinaryConstraintTest</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">ConstraintSolver::BinaryConstraintTest</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/test/BinaryConstraintTest_rb.html">
59
+ test/BinaryConstraintTest.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Test::Unit::TestCase
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+ <div id="diagram">
81
+ <map id="map" name="map">
82
+ <area shape="rect" coords="1537,5,1665,53" href="../Test/Unit/TestCase.html" alt="Test::Unit::TestCase" />
83
+ <area shape="rect" coords="937,133,1089,181" href="AllDifferentConstraintTest.html" alt="AllDifferentConstraintTest" />
84
+ <area shape="rect" coords="2305,133,2396,181" href="SolutionTest.html" alt="SolutionTest" />
85
+ <area shape="rect" coords="204,133,335,181" href="ConstraintSolverTest.html" alt="ConstraintSolverTest" />
86
+ <area shape="rect" coords="1923,133,2040,181" href="ConstraintListTest.html" alt="ConstraintListTest" />
87
+ <area shape="rect" coords="1123,133,1213,181" href="VariableTest.html" alt="VariableTest" />
88
+ <area shape="rect" coords="2429,133,2517,181" href="DomainTest.html" alt="DomainTest" />
89
+ <area shape="rect" coords="1387,133,1517,181" href="BinaryConstraintTest.html" alt="BinaryConstraintTest" />
90
+ <area shape="rect" coords="1797,133,1888,181" href="ProblemTest.html" alt="ProblemTest" />
91
+ <area shape="rect" coords="1541,133,1661,181" href="BinaryRelationTest.html" alt="BinaryRelationTest" />
92
+ <area shape="rect" coords="589,5,667,53" href="../Exception.html" alt="Exception" />
93
+ <area shape="rect" coords="463,133,615,181" href="DomainWipeoutException.html" alt="DomainWipeoutException" />
94
+ <area shape="rect" coords="639,133,799,181" href="UndoStackEmptyException.html" alt="UndoStackEmptyException" />
95
+ <area shape="rect" coords="53,133,171,181" href="AbstractConstraint.html" alt="AbstractConstraint" />
96
+ <area shape="rect" coords="160,237,269,285" href="BinaryConstraint.html" alt="BinaryConstraint" />
97
+ <area shape="rect" coords="301,237,432,285" href="AllDifferentConstraint.html" alt="AllDifferentConstraint" />
98
+ <area shape="rect" coords="2085,5,2157,53" href="../Array.html" alt="Array" />
99
+ <area shape="rect" coords="2073,133,2169,181" href="ConstraintList.html" alt="ConstraintList" />
100
+ <area shape="rect" coords="37,237,136,285" href="BinaryRelation.html" alt="BinaryRelation" />
101
+ <area shape="rect" coords="2201,133,2273,181" href="Variable.html" alt="Variable" />
102
+ <area shape="rect" coords="1693,133,1765,181" href="Solution.html" alt="Solution" />
103
+ <area shape="rect" coords="1245,133,1355,181" href="ConstraintSolver.html" alt="ConstraintSolver" />
104
+ <area shape="rect" coords="831,133,903,181" href="Problem.html" alt="Problem" />
105
+ <area shape="rect" coords="367,133,439,181" href="Domain.html" alt="Domain" />
106
+ <area shape="rect" coords="2419,99,2531,192" href="../ConstraintSolver.html" alt="test/DomainTest.rb" />
107
+ <area shape="rect" coords="2295,99,2408,192" href="../ConstraintSolver.html" alt="test/SolutionTest.rb" />
108
+ <area shape="rect" coords="27,203,280,296" href="../ConstraintSolver.html" alt="lib/BinaryConstraint.rb" />
109
+ <area shape="rect" coords="2191,99,2284,192" href="../ConstraintSolver.html" alt="lib/Variable.rb" />
110
+ <area shape="rect" coords="1912,99,2052,192" href="../ConstraintSolver.html" alt="test/ConstraintListTest.rb" />
111
+ <area shape="rect" coords="2063,99,2180,192" href="../ConstraintSolver.html" alt="lib/ConstraintList.rb" />
112
+ <area shape="rect" coords="1787,99,1901,192" href="../ConstraintSolver.html" alt="test/ProblemTest.rb" />
113
+ <area shape="rect" coords="1683,99,1776,192" href="../ConstraintSolver.html" alt="lib/Solution.rb" />
114
+ <area shape="rect" coords="1376,99,1672,192" href="../ConstraintSolver.html" alt="test/BinaryConstraintTest.rb" />
115
+ <area shape="rect" coords="1235,99,1365,192" href="../ConstraintSolver.html" alt="lib/ConstraintSolver.rb" />
116
+ <area shape="rect" coords="1111,99,1224,192" href="../ConstraintSolver.html" alt="test/VariableTest.rb" />
117
+ <area shape="rect" coords="924,99,1100,192" href="../ConstraintSolver.html" alt="test/AllDifferentConstraintTest.rb" />
118
+ <area shape="rect" coords="291,203,443,296" href="../ConstraintSolver.html" alt="lib/AllDifferentConstraint.rb" />
119
+ <area shape="rect" coords="820,99,913,192" href="../ConstraintSolver.html" alt="lib/Problem.rb" />
120
+ <area shape="rect" coords="192,99,345,192" href="../ConstraintSolver.html" alt="test/ConstraintSolverTest.rb" />
121
+ <area shape="rect" coords="356,99,809,192" href="../ConstraintSolver.html" alt="lib/Domain.rb" />
122
+ <area shape="rect" coords="43,99,181,192" href="../ConstraintSolver.html" alt="lib/AbstractConstraint.rb" />
123
+ <area shape="rect" coords="16,64,2541,307" href="../ConstraintSolver.html" alt="ConstraintSolver" />
124
+ </map>
125
+ <img src="../../dot/m_19_0.png" usemap="#map" border="0" alt="dot/m_19_0.png">
126
+ </div>
127
+
128
+
129
+
130
+ </div>
131
+
132
+ <div id="method-list">
133
+ <h3 class="section-bar">Methods</h3>
134
+
135
+ <div class="name-list">
136
+ <a href="#M000071">setup</a>&nbsp;&nbsp;
137
+ <a href="#M000073">testAssigned</a>&nbsp;&nbsp;
138
+ <a href="#M000072">testConstructor</a>&nbsp;&nbsp;
139
+ <a href="#M000076">testEquals</a>&nbsp;&nbsp;
140
+ <a href="#M000075">testHolds</a>&nbsp;&nbsp;
141
+ <a href="#M000074">testInclude</a>&nbsp;&nbsp;
142
+ <a href="#M000077">testRevise</a>&nbsp;&nbsp;
143
+ </div>
144
+ </div>
145
+
146
+ </div>
147
+
148
+
149
+ <!-- if includes -->
150
+
151
+ <div id="section">
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+ <!-- if method_list -->
161
+ <div id="methods">
162
+ <h3 class="section-bar">Public Instance methods</h3>
163
+
164
+ <div id="method-M000071" class="method-detail">
165
+ <a name="M000071"></a>
166
+
167
+ <div class="method-heading">
168
+ <a href="#M000071" class="method-signature">
169
+ <span class="method-name">setup</span><span class="method-args">()</span>
170
+ </a>
171
+ </div>
172
+
173
+ <div class="method-description">
174
+ <p><a class="source-toggle" href="#"
175
+ onclick="toggleCode('M000071-source');return false;">[Source]</a></p>
176
+ <div class="method-source-code" id="M000071-source">
177
+ <pre>
178
+ <span class="ruby-comment cmt"># File test/BinaryConstraintTest.rb, line 12</span>
179
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>
180
+ <span class="ruby-ivar">@lhs</span> = <span class="ruby-constant">Variable</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;lhs&quot;</span>, <span class="ruby-constant">Domain</span>.<span class="ruby-identifier">new</span>([ <span class="ruby-value">1</span>, <span class="ruby-value">2</span> ].<span class="ruby-identifier">to_set</span>))
181
+ <span class="ruby-ivar">@rhs</span> = <span class="ruby-constant">Variable</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;rhs&quot;</span>, <span class="ruby-constant">Domain</span>.<span class="ruby-identifier">new</span>([ <span class="ruby-value">1</span>, <span class="ruby-value">2</span> ].<span class="ruby-identifier">to_set</span>))
182
+ <span class="ruby-ivar">@rel</span> = <span class="ruby-constant">BinaryRelation</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;==&quot;</span>)
183
+ <span class="ruby-ivar">@constraint</span> = <span class="ruby-constant">BinaryConstraint</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@lhs</span>, <span class="ruby-ivar">@rhs</span>, <span class="ruby-ivar">@rel</span>)
184
+ <span class="ruby-keyword kw">end</span>
185
+ </pre>
186
+ </div>
187
+ </div>
188
+ </div>
189
+
190
+ <div id="method-M000073" class="method-detail">
191
+ <a name="M000073"></a>
192
+
193
+ <div class="method-heading">
194
+ <a href="#M000073" class="method-signature">
195
+ <span class="method-name">testAssigned</span><span class="method-args">()</span>
196
+ </a>
197
+ </div>
198
+
199
+ <div class="method-description">
200
+ <p><a class="source-toggle" href="#"
201
+ onclick="toggleCode('M000073-source');return false;">[Source]</a></p>
202
+ <div class="method-source-code" id="M000073-source">
203
+ <pre>
204
+ <span class="ruby-comment cmt"># File test/BinaryConstraintTest.rb, line 25</span>
205
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">testAssigned</span>
206
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword kw">false</span>, <span class="ruby-ivar">@constraint</span>.<span class="ruby-identifier">allAssigned?</span>)
207
+ <span class="ruby-ivar">@rhs</span>.<span class="ruby-identifier">value</span> = <span class="ruby-value">1</span>
208
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword kw">false</span>, <span class="ruby-ivar">@constraint</span>.<span class="ruby-identifier">allAssigned?</span>)
209
+ <span class="ruby-ivar">@lhs</span>.<span class="ruby-identifier">value</span> = <span class="ruby-value">1</span>
210
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword kw">true</span>, <span class="ruby-ivar">@constraint</span>.<span class="ruby-identifier">allAssigned?</span>)
211
+ <span class="ruby-ivar">@rhs</span>.<span class="ruby-identifier">reset</span>
212
+ <span class="ruby-ivar">@lhs</span>.<span class="ruby-identifier">reset</span>
213
+ <span class="ruby-keyword kw">end</span>
214
+ </pre>
215
+ </div>
216
+ </div>
217
+ </div>
218
+
219
+ <div id="method-M000072" class="method-detail">
220
+ <a name="M000072"></a>
221
+
222
+ <div class="method-heading">
223
+ <a href="#M000072" class="method-signature">
224
+ <span class="method-name">testConstructor</span><span class="method-args">()</span>
225
+ </a>
226
+ </div>
227
+
228
+ <div class="method-description">
229
+ <p><a class="source-toggle" href="#"
230
+ onclick="toggleCode('M000072-source');return false;">[Source]</a></p>
231
+ <div class="method-source-code" id="M000072-source">
232
+ <pre>
233
+ <span class="ruby-comment cmt"># File test/BinaryConstraintTest.rb, line 19</span>
234
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">testConstructor</span>
235
+ <span class="ruby-identifier">assert_raise</span>(<span class="ruby-constant">ArgumentError</span>) { <span class="ruby-constant">BinaryConstraint</span>.<span class="ruby-identifier">new</span> }
236
+ <span class="ruby-identifier">assert_raise</span>(<span class="ruby-constant">ArgumentError</span>) { <span class="ruby-constant">BinaryConstraint</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@lhs</span>, <span class="ruby-ivar">@rhs</span>, <span class="ruby-constant">Proc</span>.<span class="ruby-identifier">new</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span> }) }
237
+ <span class="ruby-identifier">assert_nothing_raised</span> { <span class="ruby-constant">BinaryConstraint</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@lhs</span>, <span class="ruby-ivar">@rhs</span>, <span class="ruby-ivar">@rel</span>) }
238
+ <span class="ruby-keyword kw">end</span>
239
+ </pre>
240
+ </div>
241
+ </div>
242
+ </div>
243
+
244
+ <div id="method-M000076" class="method-detail">
245
+ <a name="M000076"></a>
246
+
247
+ <div class="method-heading">
248
+ <a href="#M000076" class="method-signature">
249
+ <span class="method-name">testEquals</span><span class="method-args">()</span>
250
+ </a>
251
+ </div>
252
+
253
+ <div class="method-description">
254
+ <p><a class="source-toggle" href="#"
255
+ onclick="toggleCode('M000076-source');return false;">[Source]</a></p>
256
+ <div class="method-source-code" id="M000076-source">
257
+ <pre>
258
+ <span class="ruby-comment cmt"># File test/BinaryConstraintTest.rb, line 52</span>
259
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">testEquals</span>
260
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-constant">BinaryConstraint</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@lhs</span>, <span class="ruby-ivar">@rhs</span>, <span class="ruby-ivar">@rel</span>), <span class="ruby-ivar">@constraint</span>)
261
+ <span class="ruby-identifier">assert_not_equal</span>(<span class="ruby-constant">BinaryConstraint</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@lhs</span>, <span class="ruby-ivar">@rhs</span>, <span class="ruby-constant">BinaryRelation</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;&lt;&quot;</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">b</span> }), <span class="ruby-ivar">@constraint</span>)
262
+ <span class="ruby-identifier">assert_not_equal</span>(<span class="ruby-constant">BinaryConstraint</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Variable</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;foo&quot;</span>, [ <span class="ruby-value">1</span> ].<span class="ruby-identifier">to_set</span>), <span class="ruby-ivar">@rhs</span>, <span class="ruby-ivar">@rel</span>), <span class="ruby-ivar">@constraint</span>)
263
+ <span class="ruby-identifier">assert_not_equal</span>(<span class="ruby-constant">BinaryConstraint</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@lhs</span>, <span class="ruby-constant">Variable</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;foo&quot;</span>, [ <span class="ruby-value">1</span> ].<span class="ruby-identifier">to_set</span>), <span class="ruby-ivar">@rel</span>), <span class="ruby-ivar">@constraint</span>)
264
+ <span class="ruby-keyword kw">end</span>
265
+ </pre>
266
+ </div>
267
+ </div>
268
+ </div>
269
+
270
+ <div id="method-M000075" class="method-detail">
271
+ <a name="M000075"></a>
272
+
273
+ <div class="method-heading">
274
+ <a href="#M000075" class="method-signature">
275
+ <span class="method-name">testHolds</span><span class="method-args">()</span>
276
+ </a>
277
+ </div>
278
+
279
+ <div class="method-description">
280
+ <p><a class="source-toggle" href="#"
281
+ onclick="toggleCode('M000075-source');return false;">[Source]</a></p>
282
+ <div class="method-source-code" id="M000075-source">
283
+ <pre>
284
+ <span class="ruby-comment cmt"># File test/BinaryConstraintTest.rb, line 41</span>
285
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">testHolds</span>
286
+ <span class="ruby-identifier">assert_raise</span>(<span class="ruby-constant">RuntimeError</span>) { <span class="ruby-ivar">@constraint</span>.<span class="ruby-identifier">holds?</span> }
287
+ <span class="ruby-identifier">assert_nothing_raised</span> { <span class="ruby-ivar">@lhs</span>.<span class="ruby-identifier">value</span> = <span class="ruby-value">1</span> }
288
+ <span class="ruby-identifier">assert_nothing_raised</span> { <span class="ruby-ivar">@rhs</span>.<span class="ruby-identifier">value</span> = <span class="ruby-value">2</span> }
289
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword kw">false</span>, <span class="ruby-ivar">@constraint</span>.<span class="ruby-identifier">holds?</span>)
290
+ <span class="ruby-identifier">assert_nothing_raised</span> { <span class="ruby-ivar">@rhs</span>.<span class="ruby-identifier">value</span> = <span class="ruby-value">1</span> }
291
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword kw">true</span>, <span class="ruby-ivar">@constraint</span>.<span class="ruby-identifier">holds?</span>)
292
+ <span class="ruby-ivar">@lhs</span>.<span class="ruby-identifier">reset</span>
293
+ <span class="ruby-ivar">@rhs</span>.<span class="ruby-identifier">reset</span>
294
+ <span class="ruby-keyword kw">end</span>
295
+ </pre>
296
+ </div>
297
+ </div>
298
+ </div>
299
+
300
+ <div id="method-M000074" class="method-detail">
301
+ <a name="M000074"></a>
302
+
303
+ <div class="method-heading">
304
+ <a href="#M000074" class="method-signature">
305
+ <span class="method-name">testInclude</span><span class="method-args">()</span>
306
+ </a>
307
+ </div>
308
+
309
+ <div class="method-description">
310
+ <p><a class="source-toggle" href="#"
311
+ onclick="toggleCode('M000074-source');return false;">[Source]</a></p>
312
+ <div class="method-source-code" id="M000074-source">
313
+ <pre>
314
+ <span class="ruby-comment cmt"># File test/BinaryConstraintTest.rb, line 35</span>
315
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">testInclude</span>
316
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword kw">true</span>, <span class="ruby-ivar">@constraint</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-ivar">@lhs</span>))
317
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword kw">true</span>, <span class="ruby-ivar">@constraint</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-ivar">@rhs</span>))
318
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-keyword kw">false</span>, <span class="ruby-ivar">@constraint</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-constant">Variable</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;2&quot;</span>, [ <span class="ruby-value">3</span> ].<span class="ruby-identifier">to_set</span>)))
319
+ <span class="ruby-keyword kw">end</span>
320
+ </pre>
321
+ </div>
322
+ </div>
323
+ </div>
324
+
325
+ <div id="method-M000077" class="method-detail">
326
+ <a name="M000077"></a>
327
+
328
+ <div class="method-heading">
329
+ <a href="#M000077" class="method-signature">
330
+ <span class="method-name">testRevise</span><span class="method-args">()</span>
331
+ </a>
332
+ </div>
333
+
334
+ <div class="method-description">
335
+ <p><a class="source-toggle" href="#"
336
+ onclick="toggleCode('M000077-source');return false;">[Source]</a></p>
337
+ <div class="method-source-code" id="M000077-source">
338
+ <pre>
339
+ <span class="ruby-comment cmt"># File test/BinaryConstraintTest.rb, line 59</span>
340
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">testRevise</span>
341
+ <span class="ruby-identifier">lhs</span> = <span class="ruby-constant">Variable</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;x&quot;</span>, <span class="ruby-constant">Domain</span>.<span class="ruby-identifier">new</span>([ <span class="ruby-value">1</span> ].<span class="ruby-identifier">to_set</span>))
342
+ <span class="ruby-identifier">rhs</span> = <span class="ruby-constant">Variable</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;y&quot;</span>, <span class="ruby-constant">Domain</span>.<span class="ruby-identifier">new</span>([ <span class="ruby-value">1</span>, <span class="ruby-value">2</span>, <span class="ruby-value">3</span>, <span class="ruby-value">4</span> ].<span class="ruby-identifier">to_set</span>))
343
+ <span class="ruby-identifier">rel</span> = <span class="ruby-constant">BinaryRelation</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;&lt;&quot;</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">b</span> }
344
+ <span class="ruby-identifier">constraint</span> = <span class="ruby-constant">BinaryConstraint</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">lhs</span>, <span class="ruby-identifier">rhs</span>, <span class="ruby-identifier">rel</span>)
345
+ <span class="ruby-identifier">revisedVariables</span>, <span class="ruby-identifier">checks</span> = <span class="ruby-identifier">constraint</span>.<span class="ruby-identifier">revise</span>
346
+ <span class="ruby-identifier">assert_equal</span>([ <span class="ruby-identifier">rhs</span> ], <span class="ruby-identifier">revisedVariables</span>)
347
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">4</span>, <span class="ruby-identifier">checks</span>)
348
+ <span class="ruby-identifier">assert_equal</span>([ <span class="ruby-value">2</span>, <span class="ruby-value">3</span>, <span class="ruby-value">4</span> ].<span class="ruby-identifier">to_set</span>, <span class="ruby-identifier">rhs</span>.<span class="ruby-identifier">values</span>)
349
+ <span class="ruby-keyword kw">end</span>
350
+ </pre>
351
+ </div>
352
+ </div>
353
+ </div>
354
+
355
+
356
+ </div>
357
+
358
+
359
+ </div>
360
+
361
+
362
+ <div id="validator-badges">
363
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
364
+ </div>
365
+
366
+ </body>
367
+ </html>
@@ -0,0 +1,276 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: ConstraintSolver::BinaryRelation</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">ConstraintSolver::BinaryRelation</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/BinaryConstraint_rb.html">
59
+ lib/BinaryConstraint.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+ <div id="diagram">
81
+ <map id="map" name="map">
82
+ <area shape="rect" coords="1537,5,1665,53" href="../Test/Unit/TestCase.html" alt="Test::Unit::TestCase" />
83
+ <area shape="rect" coords="937,133,1089,181" href="AllDifferentConstraintTest.html" alt="AllDifferentConstraintTest" />
84
+ <area shape="rect" coords="2305,133,2396,181" href="SolutionTest.html" alt="SolutionTest" />
85
+ <area shape="rect" coords="204,133,335,181" href="ConstraintSolverTest.html" alt="ConstraintSolverTest" />
86
+ <area shape="rect" coords="1923,133,2040,181" href="ConstraintListTest.html" alt="ConstraintListTest" />
87
+ <area shape="rect" coords="1123,133,1213,181" href="VariableTest.html" alt="VariableTest" />
88
+ <area shape="rect" coords="2429,133,2517,181" href="DomainTest.html" alt="DomainTest" />
89
+ <area shape="rect" coords="1387,133,1517,181" href="BinaryConstraintTest.html" alt="BinaryConstraintTest" />
90
+ <area shape="rect" coords="1797,133,1888,181" href="ProblemTest.html" alt="ProblemTest" />
91
+ <area shape="rect" coords="1541,133,1661,181" href="BinaryRelationTest.html" alt="BinaryRelationTest" />
92
+ <area shape="rect" coords="589,5,667,53" href="../Exception.html" alt="Exception" />
93
+ <area shape="rect" coords="463,133,615,181" href="DomainWipeoutException.html" alt="DomainWipeoutException" />
94
+ <area shape="rect" coords="639,133,799,181" href="UndoStackEmptyException.html" alt="UndoStackEmptyException" />
95
+ <area shape="rect" coords="53,133,171,181" href="AbstractConstraint.html" alt="AbstractConstraint" />
96
+ <area shape="rect" coords="160,237,269,285" href="BinaryConstraint.html" alt="BinaryConstraint" />
97
+ <area shape="rect" coords="301,237,432,285" href="AllDifferentConstraint.html" alt="AllDifferentConstraint" />
98
+ <area shape="rect" coords="2085,5,2157,53" href="../Array.html" alt="Array" />
99
+ <area shape="rect" coords="2073,133,2169,181" href="ConstraintList.html" alt="ConstraintList" />
100
+ <area shape="rect" coords="37,237,136,285" href="BinaryRelation.html" alt="BinaryRelation" />
101
+ <area shape="rect" coords="2201,133,2273,181" href="Variable.html" alt="Variable" />
102
+ <area shape="rect" coords="1693,133,1765,181" href="Solution.html" alt="Solution" />
103
+ <area shape="rect" coords="1245,133,1355,181" href="ConstraintSolver.html" alt="ConstraintSolver" />
104
+ <area shape="rect" coords="831,133,903,181" href="Problem.html" alt="Problem" />
105
+ <area shape="rect" coords="367,133,439,181" href="Domain.html" alt="Domain" />
106
+ <area shape="rect" coords="2419,99,2531,192" href="../ConstraintSolver.html" alt="test/DomainTest.rb" />
107
+ <area shape="rect" coords="2295,99,2408,192" href="../ConstraintSolver.html" alt="test/SolutionTest.rb" />
108
+ <area shape="rect" coords="27,203,280,296" href="../ConstraintSolver.html" alt="lib/BinaryConstraint.rb" />
109
+ <area shape="rect" coords="2191,99,2284,192" href="../ConstraintSolver.html" alt="lib/Variable.rb" />
110
+ <area shape="rect" coords="1912,99,2052,192" href="../ConstraintSolver.html" alt="test/ConstraintListTest.rb" />
111
+ <area shape="rect" coords="2063,99,2180,192" href="../ConstraintSolver.html" alt="lib/ConstraintList.rb" />
112
+ <area shape="rect" coords="1787,99,1901,192" href="../ConstraintSolver.html" alt="test/ProblemTest.rb" />
113
+ <area shape="rect" coords="1683,99,1776,192" href="../ConstraintSolver.html" alt="lib/Solution.rb" />
114
+ <area shape="rect" coords="1376,99,1672,192" href="../ConstraintSolver.html" alt="test/BinaryConstraintTest.rb" />
115
+ <area shape="rect" coords="1235,99,1365,192" href="../ConstraintSolver.html" alt="lib/ConstraintSolver.rb" />
116
+ <area shape="rect" coords="1111,99,1224,192" href="../ConstraintSolver.html" alt="test/VariableTest.rb" />
117
+ <area shape="rect" coords="924,99,1100,192" href="../ConstraintSolver.html" alt="test/AllDifferentConstraintTest.rb" />
118
+ <area shape="rect" coords="291,203,443,296" href="../ConstraintSolver.html" alt="lib/AllDifferentConstraint.rb" />
119
+ <area shape="rect" coords="820,99,913,192" href="../ConstraintSolver.html" alt="lib/Problem.rb" />
120
+ <area shape="rect" coords="192,99,345,192" href="../ConstraintSolver.html" alt="test/ConstraintSolverTest.rb" />
121
+ <area shape="rect" coords="356,99,809,192" href="../ConstraintSolver.html" alt="lib/Domain.rb" />
122
+ <area shape="rect" coords="43,99,181,192" href="../ConstraintSolver.html" alt="lib/AbstractConstraint.rb" />
123
+ <area shape="rect" coords="16,64,2541,307" href="../ConstraintSolver.html" alt="ConstraintSolver" />
124
+ </map>
125
+ <img src="../../dot/m_19_0.png" usemap="#map" border="0" alt="dot/m_19_0.png">
126
+ </div>
127
+
128
+ <div id="description">
129
+ <p>
130
+ Represents a binary relation.
131
+ </p>
132
+
133
+ </div>
134
+
135
+
136
+ </div>
137
+
138
+ <div id="method-list">
139
+ <h3 class="section-bar">Methods</h3>
140
+
141
+ <div class="name-list">
142
+ <a href="#M000011">arity</a>&nbsp;&nbsp;
143
+ <a href="#M000010">call</a>&nbsp;&nbsp;
144
+ <a href="#M000009">new</a>&nbsp;&nbsp;
145
+ <a href="#M000012">to_s</a>&nbsp;&nbsp;
146
+ </div>
147
+ </div>
148
+
149
+ </div>
150
+
151
+
152
+ <!-- if includes -->
153
+
154
+ <div id="section">
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+ <!-- if method_list -->
164
+ <div id="methods">
165
+ <h3 class="section-bar">Public Class methods</h3>
166
+
167
+ <div id="method-M000009" class="method-detail">
168
+ <a name="M000009"></a>
169
+
170
+ <div class="method-heading">
171
+ <a href="#M000009" class="method-signature">
172
+ <span class="method-name">new</span><span class="method-args">(string)</span>
173
+ </a>
174
+ </div>
175
+
176
+ <div class="method-description">
177
+ <p><a class="source-toggle" href="#"
178
+ onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
179
+ <div class="method-source-code" id="M000009-source">
180
+ <pre>
181
+ <span class="ruby-comment cmt"># File lib/BinaryConstraint.rb, line 109</span>
182
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">string</span>)
183
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">string</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;!=&quot;</span>
184
+ <span class="ruby-identifier">string</span> = <span class="ruby-value str">&quot;not_equal?&quot;</span>
185
+ <span class="ruby-keyword kw">end</span>
186
+ <span class="ruby-ivar">@string</span> = <span class="ruby-identifier">string</span>
187
+ <span class="ruby-keyword kw">end</span>
188
+ </pre>
189
+ </div>
190
+ </div>
191
+ </div>
192
+
193
+ <h3 class="section-bar">Public Instance methods</h3>
194
+
195
+ <div id="method-M000011" class="method-detail">
196
+ <a name="M000011"></a>
197
+
198
+ <div class="method-heading">
199
+ <a href="#M000011" class="method-signature">
200
+ <span class="method-name">arity</span><span class="method-args">()</span>
201
+ </a>
202
+ </div>
203
+
204
+ <div class="method-description">
205
+ <p><a class="source-toggle" href="#"
206
+ onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
207
+ <div class="method-source-code" id="M000011-source">
208
+ <pre>
209
+ <span class="ruby-comment cmt"># File lib/BinaryConstraint.rb, line 120</span>
210
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">arity</span>
211
+ <span class="ruby-keyword kw">return</span> <span class="ruby-value">2</span>
212
+ <span class="ruby-keyword kw">end</span>
213
+ </pre>
214
+ </div>
215
+ </div>
216
+ </div>
217
+
218
+ <div id="method-M000010" class="method-detail">
219
+ <a name="M000010"></a>
220
+
221
+ <div class="method-heading">
222
+ <a href="#M000010" class="method-signature">
223
+ <span class="method-name">call</span><span class="method-args">(a, b)</span>
224
+ </a>
225
+ </div>
226
+
227
+ <div class="method-description">
228
+ <p><a class="source-toggle" href="#"
229
+ onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
230
+ <div class="method-source-code" id="M000010-source">
231
+ <pre>
232
+ <span class="ruby-comment cmt"># File lib/BinaryConstraint.rb, line 116</span>
233
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">call</span>(<span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span>)
234
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">send</span>(<span class="ruby-ivar">@string</span>, <span class="ruby-identifier">b</span>)
235
+ <span class="ruby-keyword kw">end</span>
236
+ </pre>
237
+ </div>
238
+ </div>
239
+ </div>
240
+
241
+ <div id="method-M000012" class="method-detail">
242
+ <a name="M000012"></a>
243
+
244
+ <div class="method-heading">
245
+ <a href="#M000012" class="method-signature">
246
+ <span class="method-name">to_s</span><span class="method-args">()</span>
247
+ </a>
248
+ </div>
249
+
250
+ <div class="method-description">
251
+ <p><a class="source-toggle" href="#"
252
+ onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
253
+ <div class="method-source-code" id="M000012-source">
254
+ <pre>
255
+ <span class="ruby-comment cmt"># File lib/BinaryConstraint.rb, line 124</span>
256
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
257
+ <span class="ruby-ivar">@string</span>
258
+ <span class="ruby-keyword kw">end</span>
259
+ </pre>
260
+ </div>
261
+ </div>
262
+ </div>
263
+
264
+
265
+ </div>
266
+
267
+
268
+ </div>
269
+
270
+
271
+ <div id="validator-badges">
272
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
273
+ </div>
274
+
275
+ </body>
276
+ </html>