Skip to content

ADVisualizer/ADV-Lib

Repository files navigation

ADV - Algorithm and Datastructure Visualizer

Download Codacy Badge Build Status codecov

The Algorithm & Data Structure Visualizer (ADV) helps students to understand the concepts of several data structures and algorithms, taught at the University of Applied Science in Rapperswil (HSR).

ADV-Lib

The ADV-Lib is a Java Library offering classes and interfaces to visualize data structures. Once implemented, the state of a data structure can be sent to the ADV-UI to be displayed. Algorithms can be visualized by the use of styles.

Install

The ADV-Lib is available on jCenter. It requires Java 11 or higher.

Gradle

compile 'ch.hsr.adv:adv-lib:2.0'

Maven

<dependency>
  <groupId>ch.hsr.adv</groupId>
  <artifactId>adv-lib</artifactId>
  <version>2.0</version>
</dependency>

Starter Projects

ADV offeres Starter Projects for both Maven and Gradle. These Projects are empty IntelliJ Projects with pre-configered ADV dependencies. Gradle Starter Maven Starter

Usage

Connect to the UI:

ADV.launch(args);

Use any of ADV's Modules to implement your data structures and algorithms. Here is an example with the array module:

private static final String[] objectArray = new String[7];
private static final ArrayModule arrayModule = new ArrayModule("ObjectArray", objectArray);

Send snapshots of the state of your data structure to the ADV UI to be displayed:

ADV.snapshot(arrayModule, "Default Initialization of a String array.");

Have a look at the User Codebase Project for more examples.