Last change
on this file since 256 was 253, checked in by Faria Nassiri Mofakham, 5 years ago |
Commit #1 of:
+ negotiator.onetomany package refactored into onetomany package.
+ info created for all contained the packages.
+ current work defined under onetomany.bargainingchipsgame.
+ in this package, onetomany.bargainingchipsgame.players package includes packages for utility function, coordinator, negotiatior, and buyer and seller.
+ negotiator.onetomany package now contains nothing, can be deleted.
+ Interaction thread
|
File size:
962 bytes
|
Rev | Line | |
---|
[253] | 1 | /**
|
---|
| 2 | * OtherOperators class
|
---|
| 3 | */
|
---|
| 4 | package onetomany.etc;
|
---|
| 5 |
|
---|
| 6 | /**
|
---|
| 7 | * This package is devoted to several operators, e.g., a few mathematical or so, such as max, min, etc.
|
---|
| 8 | *
|
---|
| 9 | *
|
---|
| 10 | * @author Faria Nassiri-Mofakham
|
---|
| 11 | *
|
---|
| 12 | */
|
---|
| 13 | public class OtherOperators {
|
---|
| 14 |
|
---|
| 15 | public long min(long op1, long op2)
|
---|
| 16 | {
|
---|
| 17 | if (op1>=op2)
|
---|
| 18 | return op2;
|
---|
| 19 | else
|
---|
| 20 | return op1;
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | public int min(int op1, int op2)
|
---|
| 24 | {
|
---|
| 25 | if (op1>=op2)
|
---|
| 26 | return op2;
|
---|
| 27 | else
|
---|
| 28 | return op1;
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 | public double min(double op1, double op2)
|
---|
| 32 | {
|
---|
| 33 | if (op1>=op2)
|
---|
| 34 | return op2;
|
---|
| 35 | else
|
---|
| 36 | return op1;
|
---|
| 37 | }
|
---|
| 38 |
|
---|
| 39 | public long max(long op1, long op2)
|
---|
| 40 | {
|
---|
| 41 | if (op1>=op2)
|
---|
| 42 | return op1;
|
---|
| 43 | else
|
---|
| 44 | return op2;
|
---|
| 45 | }
|
---|
| 46 |
|
---|
| 47 | public int max(int op1, int op2)
|
---|
| 48 | {
|
---|
| 49 | if (op1>=op2)
|
---|
| 50 | return op1;
|
---|
| 51 | else
|
---|
| 52 | return op2;
|
---|
| 53 | }
|
---|
| 54 |
|
---|
| 55 | public double max(double op1, double op2)
|
---|
| 56 | {
|
---|
| 57 | if (op1>=op2)
|
---|
| 58 | return op1;
|
---|
| 59 | else
|
---|
| 60 | return op2;
|
---|
| 61 | }
|
---|
| 62 |
|
---|
| 63 |
|
---|
| 64 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.