Basic example of using Davis
Install dependencies locally
./gradlew downloadAndUnzipFile
Getting started without IDE
- Write your java algorithm into the
src
folder :MyAlgo.java
- Configure your
PATH
variable
export PATH=$PATH:`pwd`/build/install/davis-beta/bin
- Execute in the
src
directory
udavis -n <networkGeneratorFile> -i <ids> -s <size> -al <algoFile : MyAlgo.java>
gradle
Working with - Modify
commandLine
parameters for taskdavis
inbuild.gradle
. - Run
./gradlew hello
You can also collect all your examples in a scenario
file
- Open
scr/scenario
file and add a line with 5 parameters :[<scenarioName>] -n <networkGeneratorFile> -i <scheme> -s <size> -al <algoFile : MyAlgo.java>
- Execute in a terminal with
./gradlew run[scenarioName]
Getting started with Intellij
Open IntelliJ and load project :
File/Open
Choose the basic-example
folder and click ok for auto-import.
gradle
Working with Intellij and - Write your java algorithm into the
src
folder :MyAlgo.java
- Open
src/scenario
file and add a line with 5 parameters :[<scenarioName>] -n <networkGeneratorFile> -i <scheme> -s <size> -al <algoFile : MyAlgo.java>
- Refresh gradle panel.
- In
Tasks/application
of the gradle panel you should see your scenario as a gradle task namedrun[<scenarioName>]
. - Click to execute.
Docs
See also the documentation for davis.