HUT HUT - CS-lab - Research - Software Visualization Group - Matrix

Matrix 7.0 - quick tour

Main page

Publications

Documentation

Downloads

Applications

Installing and running

Binary distribution

The easiest way of installing and running Matrix is downloading the binary distribution. Download matrix.jar file into your desktop. In Windows and MacOS you can start Matrix by double clicking the matrix.jar. In Linux/Unix you can start Matrix by typing
java -jar matrix.jar

Note that you must have Java version 1.2 or newer installed to run Matrix.

Source distribution

Download and unpack the source files from the downloads page. See more instructions of compiling Matrix from the user's manual.

Applet

You can now try the latest version of Matrix as a java applet.

Note that opening and saving animations is not supported with the applet.

Using Matrix

When Matrix is succesfully started, you will see the animation window (in Figure 1). This quick tour illustrates how to get started with the GUI and how to employ the very basic animation and simulation functionality. See matrix's user manual to learn more about Matrix and it's properties.

The main components in the animation window are the following:

  • Menus (Menubar items File, Format, etc., and the context sensitive pop-up-menu),
  • Animator (Push buttons Backward, Forward, ...), and
  • Structure Panel (the area where all the visualizations appear).

Drag-and-drop keys
Figure 1: Matrix animation and simulation window.

Menus

Menus are operating system dependent window components, thus they may appear in several different places and several different ways. Usually the menubar is located at the top of the window, and the pop-up-menu can be triggered by pressing the right mouse button. The pop-up-menu is context sensitive, thus the operations depend on the component the pop-up-menu is called for.

The most important menu commands are described below with Structure Panel. For more information on the different menus, see the user's manual.

Animator

The Matrix system allows reverse execution of an algorithm trace. With the animator panel (see Figure 2), it is possible to undo and redo the operations performed on the structures. The trace can be continued from any state by performing a new operation. However, the old execution scenario (but not the history) will be lost.

Animator
Figure 2: Matrix Animator Panel

The Backward -button will undo one operation.

The Forward -button will redo one operation.

The Begin -button will undo all operations in the history.

The End -button will redo all operations in the current scenario.

The Play -button will play the animation step-by-step from the current position to the end of the scenario.

Structure Panel

You can insert data structures to the animation window through insert menu. The structures in the menu are divided to three categories: FDTs, ADTs and Utils. FDT stands for Fundamental Data Type. These are data structures that have no defined semantics. ADT stands for Abstract Data Type. These are data structures that have some sort of defined semantics (for example insert, delete, search, etc.). Utils are structures that are used to make the manipulation of ADTs and FDTs easier.

You can insert, for example, Table of Random Keys, and Binary Search Tree ADT into the animation window. In addition, you can experiment with the strucures as follows.

Drag a key from the array of keys and drop it into the title bar of the binary search tree. Repeat this a couple of times, and you will see how the keys are inserted into the correct positions in the tree. Thus, the display should look like the one in Figure 1. After that, you can scroll through the animation by pressing Backward and Forward buttons. Try also Begin and Play buttons. You can also drag the array of keys from the title bar and drop it into the title bar of the tree. All the keys should now be inserted into the binary search tree.

A key can be deleted by selecting Delete from the key's pop-up menu. If the delete operation is selected from the node's pop-up menu, the whole subtree is deleted.

What next

Matrix is a powerful tool for demonstrating algorithms. It has a library of predefined algorithms and it makes it easy for users to visualize and animate their own algorithms implemented in Java. For computer science students, Matrix can be a tool for figuring out how different algoritms work. For teachers, Matrix can be a tool for creating algorithm animations used in teaching. Feel free to experiment with the system and try out different operations. In addition, see matrix's user manual to learn more about Matrix and it's properties.


This page is maintained by the Matrix staff, email: matrix@cs.hut.fi
Page last updated: 2007-02-21
<URL: http://www.cs.hut.fi/Research/Matrix/documentation/v7.0/quickStart/index.html >