Need for complex data structures and its uses
The way in which data is stored for the purpose of retrieval and search is known as data structure. Simplest way of storing the data structure may be the one-dimensional array, in which stored elements are given index numbers and accessed by these index numbers. The items stored non-consecutively in memory are linked with pointers.
Figaro has defined the complex data structure in a very precise way. A complex data structure contains two arrays, one holds the real part of the complex data and other pat is known as imaginary part. Arrays are of same size and shape and having the different dimensions. Arrays must have the dimensions according to Fast Fourier Transfer Algorithm. The Fast Fourier Transform Algorithm computes the discrete Fourier Transform of size N in (N log N) operations. Different implementations with different FFT rules require the number of element power be of 2. When we look into brief structure of the Figaro complex data structures then we notice that main array is real part of the complex data structure and routines of Figaro are applied to complex data structure. We can take an example an easy way in which complex data structure is split that plots the real part of complex data structure. Looking on imaginary part it needs to first extract using cmplx2m or cmplx2i. Figaro functions can be used to change the data in a way as ICL> icmult cmplxdata 2 cmplxdata
Get your grade
or your money back
using our Essay Writing Service!
Which multiplies the array by 2 and imaginary part remains unchanged. To avoid the unnecessary conversions before using the FFT routines, the real and imaginary arrays are held in double precision, however this is not a compulsory requirement. Complex data structures are used in different applications with high specific tasks. Use of the complex data structure is basic requirements in developing software where huge amount of data is managed using efficiently complex data structures as in large databases.
There are other data structures which are also used as complex data structures. These data structures include the queues, dictionaries, lists, trees and stack. Queue is for the 'first in, first out' and stack on the other hand is 'last in, first out'. Stacks are used to get back data the most entry first and queue is used to store the commands which were entered and want to recreate similar conditions later.
Design and application of arrays
There are single and double dimensions arrays. Firstly we discuss the single dimension array and it can be defined as the multiple values stored under a single name and all variables are represented in one location in memory with one name and one value. When a loop in a program is loaded and we execute it, the first value is lost and second value is stored. But array programs are designed in a way to group these values and store in an array and referred by a single name. Why do wee need the arrays? We want 10 values to be stored and shown in reverse order. We need a program to be designed that will use less memory and fewer lines of codes are written. We simply need the variables to store each value in a program, but use of array has simplified this by arranging the values in an array. Arrays are used to hold multiple values and read the scores from top to bottom and then it is written from bottom up. All the values are stored in a single name. If we need to sort the values of the array then element with its position in an array are identified. An array simplifies the program and not complicates it. An array needs to be declared first to identify the variable's data types, also identify the lower and upper bounds of an array. This is the index of an array. As shown
Dim arr1 (1 to 10) As Long
In above pseudo code array arr1 contains the 10 elements with index values from 1 to 10. The first index value will be 1 and last 10. Long data type is used in this case and value does not exceed the Byte's limits.
Dynamic arrays have simplified the complexity in programming by not specifying the size of the array in a program. When size and dimensions are specified it is called as fixed-size array. On the other hand if you don't specify the size when you declare the array, then you are creating the dynamic array and ReDim keyword is used. To do so we write the pseudo code as
Always on Time
Marked to Standard
Dim arr2 () As Long
Arrays are focused to concentrate on the whole set of data and not on the single piece of data. Avoiding the unnecessary repetitive programming for the single data pieces and saving the substantial amount of space.
Modular design benefits
There are many benefits of modular designing in programming in computer science.
Re-usability: Modular designs are designed to perform a specific task in a program as an average program calculates the average of the list of values and it can be used in other programs to perform the same functionality. Re-usability saves the time of a programmer to develop the same programs for different customers.
Reliability: Modular designing is reliable when the functionality of a new developed system is according to customer requirement. Modular designs are well designed to meet the requirements of the customers. Modular designs provide the all functions which are defined in the requirements of the system. A test made in software development is reliable when the same results are achieved as before. To test this reliability different ways are used for modular design's reliability.
Robustness: It refers the testing of the software without bugs. Bugs occur in software but a robustness program does not lock up the computer. Robustness is achieved through simplicity and encourages the reuse of well-tested components. Robustness software executes without crashing when it is used inappropriately. Another example can be given as the modular designing is robustness when an invalid input value is given.
Modularity is designed for clear control of module interdependencies. It provides programmers and developers more flexibility and maintenance. Look at the real example when a new project is started regardless of its scope, it will have larger benefits for the entire application and architecture from its infancy.
Redundancy: Development of the software based on the modular design need data must be managed in a way, that data must not repeated again and again in large data base system. Data redundancy is a feature of data base systems developed on the bases of modular designs. Data repetition creates the problem for the users and he can not distinguish the same data of different objects. Data must be redundant that saves the time and space of the system.