- Clone the project to your local
- Run it and read it in your favorite way. It is at hand for Eclipse users.
TestMain.java
is the main file with some commments in it so that you could understand it more easily. There are 4 parts TestMain.Java
achieves:
- Construct a TernaryDecisionTree object manually according to the sample dabate on: http://bit.ly/1iV0zpP
Since it is a demo, we construct the object manually. Actually you need to program your own code to generate your TernaryDecisionTree Object, efficiently and correctly.
-
Create a Gson instance to convert TernaryDecisionTree Java Object into JSON String. Gson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to convert a JSON string to an equivalent Java object.
-
We convert the JSON String generated in part2 to a TernaryDecisionTree Java Object back.
-
It is the part where you should verify whether the restored TernaryDecisionTree meet requirements in your mind.
- If you are a verifier for CounterfeitBall(n,q), you construct your TernaryDecisionTree and make it into JSON String. Then you give your opposite that String.
- If you are a falsifier, after receiving the verifier's JSON String, you convert it back to a TernaryDecisionTree Object and do your verification.
Happy Debating