Changeset 15032 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/IntegerExpressions.cs
- Timestamp:
- 06/12/17 14:11:43 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/IntegerExpressions.cs
r15017 r15032 9 9 10 10 /// <summary> 11 /// Pushes the sum of the top two items. 12 /// </summary> 13 [PushExpression(StackTypes.Integer, "INTEGER.+")] 11 /// Pushes the sum of the top two items. 12 /// </summary> 13 [PushExpression( 14 StackTypes.Integer, 15 "INTEGER.+", 16 "Pushes the sum of the top two items.")] 14 17 [StorableClass] 15 18 public class IntegerAddExpression : StatelessExpression { … … 32 35 33 36 /// <summary> 34 /// Pushes the difference of the top two items; that is, the second item minus the top item. 35 /// </summary> 36 [PushExpression(StackTypes.Integer, "INTEGER.-")] 37 /// Pushes the difference of the top two items; that is, the second item minus the top item. 38 /// </summary> 39 [PushExpression( 40 StackTypes.Integer, 41 "INTEGER.-", 42 "Pushes the difference of the top two items; that is, the second item minus the top item.")] 37 43 [StorableClass] 38 44 public class IntegerSubtractExpression : StatelessExpression { … … 55 61 56 62 /// <summary> 57 /// Pushes the product of the top two items. 58 /// </summary> 59 [PushExpression(StackTypes.Integer, "INTEGER.*")] 63 /// Pushes the product of the top two items. 64 /// </summary> 65 [PushExpression( 66 StackTypes.Integer, 67 "INTEGER.*", 68 "Pushes the product of the top two items.")] 60 69 [StorableClass] 61 70 public class IntegerMultiplyExpression : StatelessExpression { … … 78 87 79 88 /// <summary> 80 /// Pushes the quotient of the top two items; that is, the second item divided by the top item. 81 /// If the top item is zero this acts as a NOOP. 82 /// </summary> 83 [PushExpression(StackTypes.Integer, "INTEGER./")] 89 /// Pushes the quotient of the top two items; that is, the second item divided by the top item. 90 /// If the top item is zero this acts as a NOOP. 91 /// </summary> 92 [PushExpression( 93 StackTypes.Integer, 94 "INTEGER./", 95 "Pushes the quotient of the top two items; that is, the second item divided by the top item. If the top item is zero this acts as a NOOP.")] 84 96 [StorableClass] 85 97 public class IntegerDivideExpression : StatelessExpression { … … 102 114 103 115 /// <summary> 104 /// Pushes the second stack item modulo the top stack item. If the top item is zero this acts as a NOOP. The modulus is105 /// computed as the remainder of the quotient, where the quotient has first been truncated toward negative infinity. (This is taken106 /// from the definition for the generic MOD function in Common Lisp, which is described for example at107 /// http://www.lispworks.com/reference/HyperSpec/Body/f_mod_r.htm.)108 /// </summary>109 [PushExpression(StackTypes.Integer, "INTEGER.%")]116 /// Pushes the second stack item modulo the top stack item. If the top item is zero this acts as a NOOP. 117 /// </summary> 118 [PushExpression( 119 StackTypes.Integer, 120 "INTEGER.%", 121 "Pushes the second stack item modulo the top stack item. If the top item is zero this acts as a NOOP.")] 110 122 [StorableClass] 111 123 public class IntegerModuloExpression : StatelessExpression { … … 128 140 129 141 /// <summary> 130 /// Pushes the minimum of the top two items. 131 /// </summary> 132 [PushExpression(StackTypes.Integer, "INTEGER.MIN")] 142 /// Pushes the minimum of the top two items. 143 /// </summary> 144 [PushExpression( 145 StackTypes.Integer, 146 "INTEGER.MIN", 147 "Pushes the minimum of the top two items.")] 133 148 [StorableClass] 134 149 public class IntegerMinExpression : StatelessExpression { … … 151 166 152 167 /// <summary> 153 /// Pushes the maximum of the top two items. 154 /// </summary> 155 [PushExpression(StackTypes.Integer, "INTEGER.MAX")] 168 /// Pushes the maximum of the top two items. 169 /// </summary> 170 [PushExpression( 171 StackTypes.Integer, 172 "INTEGER.MAX", 173 "Pushes the maximum of the top two items.")] 156 174 [StorableClass] 157 175 public class IntegerMaxExpression : StatelessExpression { … … 174 192 175 193 /// <summary> 176 /// Pushes TRUE onto the BOOLEAN stack if the second item is less than the top item, or FALSE otherwise. 177 /// </summary> 178 [PushExpression(StackTypes.Integer, "INTEGER.<", StackTypes.Boolean)] 194 /// Pushes TRUE onto the BOOLEAN stack if the second item is less than the top item, or FALSE otherwise. 195 /// </summary> 196 [PushExpression( 197 StackTypes.Integer, 198 "INTEGER.<", 199 "Pushes TRUE onto the BOOLEAN stack if the second item is less than the top item, or FALSE otherwise.", 200 StackTypes.Boolean)] 179 201 [StorableClass] 180 202 public class IntegerSmallerThanExpression : StatelessExpression { … … 198 220 199 221 /// <summary> 200 /// Pushes TRUE onto the BOOLEAN stack if the second item is less than or equal to the top item, or FALSE otherwise. 201 /// </summary> 202 [PushExpression(StackTypes.Integer, "INTEGER.<=", StackTypes.Boolean)] 222 /// Pushes TRUE onto the BOOLEAN stack if the second item is less than or equal to the top item, or FALSE otherwise. 223 /// </summary> 224 [PushExpression( 225 StackTypes.Integer, 226 "INTEGER.<=", 227 "Pushes TRUE onto the BOOLEAN stack if the second item is less than or equal to the top item, or FALSE otherwise.", 228 StackTypes.Boolean)] 203 229 [StorableClass] 204 230 public class IntegerSmallerOrEqualToExpression : StatelessExpression { … … 222 248 223 249 /// <summary> 224 /// Pushes TRUE onto the BOOLEAN stack if the second item is greater than the top item, or FALSE otherwise. 225 /// </summary> 226 [PushExpression(StackTypes.Integer, "INTEGER.>", StackTypes.Boolean)] 250 /// Pushes TRUE onto the BOOLEAN stack if the second item is greater than the top item, or FALSE otherwise. 251 /// </summary> 252 [PushExpression( 253 StackTypes.Integer, 254 "INTEGER.>", 255 "Pushes TRUE onto the BOOLEAN stack if the second item is greater than the top item, or FALSE otherwise.", 256 StackTypes.Boolean)] 227 257 [StorableClass] 228 258 public class IntegerGreaterThanExpression : StatelessExpression { … … 247 277 248 278 /// <summary> 249 /// Pushes TRUE onto the BOOLEAN stack if the second item is greater than or equal to the top item, or FALSE otherwise. 250 /// </summary> 251 [PushExpression(StackTypes.Integer, "INTEGER.>=", StackTypes.Boolean)] 279 /// Pushes TRUE onto the BOOLEAN stack if the second item is greater than or equal to the top item, or FALSE otherwise. 280 /// </summary> 281 [PushExpression( 282 StackTypes.Integer, 283 "INTEGER.>=", 284 "Pushes TRUE onto the BOOLEAN stack if the second item is greater than or equal to the top item, or FALSE otherwise.", 285 StackTypes.Boolean)] 252 286 [StorableClass] 253 287 public class IntegerGreaterOrEqualToExpression : StatelessExpression { … … 271 305 272 306 /// <summary> 273 /// Pushes 1 if the top BOOLEAN is TRUE, or 0 if the top BOOLEAN is FALSE. 274 /// </summary> 275 [PushExpression(StackTypes.Integer, "INTEGER.FROMBOOLEAN", StackTypes.Boolean)] 307 /// Pushes 1 if the top BOOLEAN is TRUE, or 0 if the top BOOLEAN is FALSE. 308 /// </summary> 309 [PushExpression( 310 StackTypes.Integer, 311 "INTEGER.FROMBOOLEAN", 312 "Pushes 1 if the top BOOLEAN is TRUE, or 0 if the top BOOLEAN is FALSE.", 313 StackTypes.Boolean)] 276 314 [StorableClass] 277 315 public class IntegerFromBooleanExpression : StatelessExpression { … … 292 330 293 331 /// <summary> 294 /// Pushes the result of truncating the top FLOAT. 295 /// </summary> 296 [PushExpression(StackTypes.Integer, "INTEGER.FROMFLOAT", StackTypes.Float)] 332 /// Pushes the result of truncating the top FLOAT. 333 /// </summary> 334 [PushExpression( 335 StackTypes.Integer, 336 "INTEGER.FROMFLOAT", 337 "Pushes the result of truncating the top FLOAT.", 338 StackTypes.Float)] 297 339 [StorableClass] 298 340 public class IntegerFromFloatExpression : StatelessExpression { … … 312 354 313 355 /// <summary> 314 /// Pushes the result of truncating the top CHAR. 315 /// </summary> 316 [PushExpression(StackTypes.Integer, "INTEGER.FROMCHAR", StackTypes.Char)] 356 /// Pushes the result of truncating the top CHAR. 357 /// </summary> 358 [PushExpression( 359 StackTypes.Integer, 360 "INTEGER.FROMCHAR", 361 "Pushes the result of truncating the top CHAR.", 362 StackTypes.Char)] 317 363 [StorableClass] 318 364 public class IntegerFromCharExpression : StatelessExpression { … … 332 378 333 379 /// <summary> 334 /// Pushes the result of parsing the top STRING. 335 /// </summary> 336 [PushExpression(StackTypes.Integer, "INTEGER.FROMSTRING", StackTypes.String)] 380 /// Pushes the result of parsing the top STRING. 381 /// </summary> 382 [PushExpression( 383 StackTypes.Integer, 384 "INTEGER.FROMSTRING", 385 "Pushes the result of parsing the top STRING.", 386 StackTypes.String)] 337 387 [StorableClass] 338 388 public class IntegerFromStringExpression : StatelessExpression { … … 357 407 358 408 /// <summary> 359 /// Pushes the result of increasing the top INTEGER by 1. 360 /// </summary> 361 [PushExpression(StackTypes.Integer, "INTEGER.INC")] 409 /// Pushes the result of increasing the top INTEGER by 1. 410 /// </summary> 411 [PushExpression( 412 StackTypes.Integer, 413 "INTEGER.INC", 414 "Pushes the result of increasing the top INTEGER by 1.")] 362 415 [StorableClass] 363 416 public class IntegerIncExpression : StatelessExpression { … … 376 429 377 430 /// <summary> 378 /// Pushes the result of decreasing the top INTEGER by 1. 379 /// </summary> 380 [PushExpression(StackTypes.Integer, "INTEGER.DEC")] 431 /// Pushes the result of decreasing the top INTEGER by 1. 432 /// </summary> 433 [PushExpression( 434 StackTypes.Integer, 435 "INTEGER.DEC", 436 "Pushes the result of decreasing the top INTEGER by 1.")] 381 437 [StorableClass] 382 438 public class IntegerDecExpression : StatelessExpression {
Note: See TracChangeset
for help on using the changeset viewer.