Calico DataStructures

From IPRE Wiki
Jump to: navigation, search

Data Structures

You can create Data Structures by using the "DataStructures" module: menu -> Edit -> Use a module -> DataStructures.

DataStructure blocks as they appear in Jigsaw:

DataStructures.gif

Array

There are two functions for creating an array: Array(type, size) and Array(type, spreadsheet). type is a string that is 'integer', 'string', or 'float'. size is an integer indicating the size. spreadsheet is the name of a CSV file from which to read the array. Data can be in row or column format.

Dictionary

The Dictionary function will create a dictionary, also known as a "hashmap", "hash table", "association table" etc.

get

The get function will retrieve data from your data structure.

List

The List function will create a List data structure.

Set

The Set function will create a Set data structure. Note that Sets have no order, so you cannot get or set an item by position using get/set.

set

The set function will allow you to set an item in your data structure.

Tuple

The Tuple function will create a read-only tuple data structure. Tuples are like Lists, but read-only.