User:Brian P. Josey/Notebook/2010/08/10: Difference between revisions
(→Arrays) |
|||
Line 16: | Line 16: | ||
* '''Index Array''' will return the elements, or a sub-array of another array at an index, | * '''Index Array''' will return the elements, or a sub-array of another array at an index, | ||
==Clusters== | |||
Clusters are similar to arrays in that they bundle different pieces of data together, but are different in that arrays only bundle together data of the same type, while a cluster generalizes this to several different types of data. While an array could be thought as a dictionary, containing only the definitions for words, a cluster would be a multiple subject notebook, with notes on physics, history and French cuisine on different pages. | |||
<!-- ##### DO NOT edit below this line unless you know what you are doing. ##### --> | <!-- ##### DO NOT edit below this line unless you know what you are doing. ##### --> |
Revision as of 14:24, 10 August 2010
Project name | <html><img src="/images/9/94/Report.png" border="0" /></html> Main project page <html><img src="/images/c/c3/Resultset_previous.png" border="0" /></html>Previous entry<html> </html>Next entry<html><img src="/images/5/5c/Resultset_next.png" border="0" /></html> |
ArraysArrays are groups of data elements that have are composed of the same type. Each array consists of the elements, and dimensions that specify the number of elements possible and their orientation in respect to how they are stored. They are ordered and can be indexed. A simplified example on how to create an array, is to generate a string of random numbers, and organize them into the array. To do this, you could simply create a for loop that generates a random number, and output it to an array. To create a two dimensional array, nest a for loop into another. The inner loop will create the columns, while the outer loop will create the rows. Several important functions that can act on an array are:
ClustersClusters are similar to arrays in that they bundle different pieces of data together, but are different in that arrays only bundle together data of the same type, while a cluster generalizes this to several different types of data. While an array could be thought as a dictionary, containing only the definitions for words, a cluster would be a multiple subject notebook, with notes on physics, history and French cuisine on different pages. |