Women from the dimensions higher than two dimensions are pretty rare in practice but you'll get a really 2
firm grasp of how adding new dimensions would impact the syntax. 3
Let's take a quick look at a 3D art. 4
Let's take an example of an electronic store who says that is represented by it data. 5
So what you see here is a data you usually data warehousing software store data and such debacles. 6
And this group has three dimensions Sleepy's. 7
I mean months on products. 8
So the store sells what products under how franchises and force it is and this only shows that for four 9
months from John to April it actually dies matter if the units sort in this diagram 850 implies that 10
850 iPads were sold in the month of April in New York stood alone all that 11 dimensions are highlighted 11
in green. 12
Such a Data Group which has three images can be implemented using it truly array. 13
If we call this as Miami and if cities are present first dimension I'm leapers in second dimension on 14
products represent third dimension. 15
Then my aread in index 0 3 and Bruhn would read and the value 858 shown in their diagram. 16
So zero in the first bucket corresponds to New York three in the second bracket got a sponsor to April 17
on one in the third bracket got to Spawn's do I buy like in the case of one dimensional. 18
Or is there are three ways to create 3-D arrays and they also use a similar syntax. 19
And this is a fun way to do it. 20
And by now we should be very familiar with the first dimension that was in cities. 21
Second time on products and we can initialize it this way. 22
And here is an illustration of a lot through the area here. 23
The second layer represents the first dimension which is cities and the first rectangle in the CPC corresponds 24
to New York New York references next dimension richest time in months and each in a triangle represents 25
a month on each slot in the rectangle can be viewed as a third dimension which is part X the value in 26
the slot is the number of units of that product sold. 27
The diagram also illustrates the example D-W which is a trophy. 28
A trophy is a number of i-Pad sold in the month of April in New York City alone. 29
The index numbers to look at this data are shown in blue zero corresponds to a New York trigona wants 30
to appear on one corresponds to IPART. 31
Now if you recall a discussion on bullier is we had a slide with similar illustration. 32
Even then the second layer represented the first dimension which is Rowse on the element in each rectangle 33
was basically the second dimension. 34
That is the actual data arge then. 35
So then we had only Boully years because it was two dimensional. 36
And here we have three layers to a very quick demo in the demo we will look at the other two ways of 37
creating 3-D areas. 38
That is the second and third approach a new method called three dimensional artist has been added to 39
the basic demo class that you can download from the resources section. 40
So let's hop onto the program. 41
OK. 42
Here is a numerator two dimensional arrays. 43
And here we are creating a three dimensional array using the second approach. 44
OK so you have the pipe followed by the empty square brackets and you are initialising right here. 45
OK so that's the second approach. 46
We know that. 47
And so it's a lot of data here and here is the first dimension. 48
So this is the second layer which is four cities. 49
And here is the time and months. 50
So that's the second dimension. 51
So this is the first dimension. 52
So this was the first dimension and time in months was the second dimension on that data that it has 53
is the third dimension which is the products. 54
So basically the data represents the units. 55
So since it is this is and be initialized it to zero all of them zero except this one. 56
So it's just the exact same example that we have seen in the slide. 57
OK. 58
So this is for New York and this is for January 1st March on April. 59
And this is the date for us for San Francisco and so on for four cities. 60
And here we are providing the value 850 So which corresponds to 0 3 and one so those are the next numbers 61
within different dimensions. 62
So just go ahead and compile and run this. 63
So it's already combining some images from this. 64
So as you can see it prints a 50. 65
So that's the using the second approach. 66
The that approach is very simple. 67
We know that all we need to do is just remove this. 68
It's the simplest form. 69
And let me just compile and run this once again. 70
So that's it. 71
So that's the three dimensional arrays and they're very rarely used. 72
And that's about it. 73
And we're not going to discuss any more dimensions so that's not enough for discussion on our test. 74
OK. 75
So go ahead on the program and you can play with that. 76
OK. 77
Thank you. 78
And happy coding