Posts Tagged Data Structures

Tutorial Java 6 – #4.3 Matrixes and Multidimensional Arrays

In this post we will see what are and how to define multidimensional arrays. The most common multidimensional array is the matrix – a two dimension array. Despite the fact in our mind a two-dimension array is like a table, a matrix is in Java an array of arrays, like in this image (a two-dimension array with 3 columns and 3 lines):
Read the rest of this entry »

,

2 Comments

Tutorial Java 6 – #4 Arrays

In this topic we will see how we define and process arrays data structures in Java.

An array is a particular form of Java object that is used to store a homogeneous list of elements (each element of the vector has the same type as vector type – the base type). The number of elements in the array is fixed and it defines its length.

Read the rest of this entry »

,

4 Comments

Tutorial Java – # 4.1 How to add a new element to a Java array

In this post we see what is the solution to the problem of adding a new element to an existing array. As we saw in the Java Tutorial 6 – #4 Arrays, arrays are objects which manage a homogeneous and compact list of items.

Because the list of elements is a compact memory area in Heap, the answer to the question of how we add a new element is that it is NOT possible. Once constructed the array, with a finite number of elements, the space it occupies can not be resized.

Read the rest of this entry »

,

4 Comments

Tutorial Java 6 – #4 Vectori

In acest topic vom vedea cum definim si cum prelucram structuri de date de tip vector sau matrice in Java.

Un vector reprezinta in Java o forma particulara de obiect ce este utilizat pentru a stoca o lista de elemente omogene (fiecare element din vector are acelasi tip ca si tipul vectorului – tip de baza). Numarul de elemente din vector este fix si defineste lungimea acestuia.

, ,

3 Comments

C and C++ library of functions and procedures for matrix (bidimensional arrays) – Comparison functions

The comparison functions used for matrix processing are needed for finding more information about a matrix or group of matrices from the point of view of: the matrix type, its elements type or the apparition number of a key in the matrix.

The function symmet checks if a matrix is a square or a symmetrical one. It gets as entry parameters the matrix’ lines and columns numbers, which are n and m, and the matrix X. The matrix is defined static. The function returns the address of an integer variable, *er, where it writes 1 if the matrix is symmetrical or 0 if the matrix isn’t symmetrical. Also it verifies if the matrix is a square one and it writes 0 at the integer variable’ address if the condition isn’t fulfilled.
Read the rest of this entry »

,

No Comments

C and C++ library of functions and procedures for matrix (bidimensional arrays) – Mathematical functions

Other posts on this topic:

The mathematical functions uses the matrices as operands in different math operations. The operations with matrices described in this chapter are adding, multiplying, transposing, subtracting and inverting. Also here are some arithmetical operations with linear matrices like adding, subtracting, multiplying and transposing. For example, two linear matrices sum is obtained after transforming the matrices in one-dimensional arrays and adding them. In the same way are done the others operations.

In this post are described the functions that are doing those computations. Both variants of defining a matrix, the static method and the dynamic one, are used. Read the rest of this entry »

,

No Comments

C and C++ library of functions and procedures for matrix (bidimensional arrays) processing – Read and Write functions

To realize a real computation of matrices it must exist in the first place the matrix or the matrices. Having created an inadequate object for work with it, the results would be unexpected. Therefore we must pay the necessary attention to those functions that are creating a matrix. In this way we won’t have any future troubles.

Matrix processing contains also a sequence of in and out functions. These functions role is:

  • to create a matrix from the console when using the library matrix.h or one with all its elements equal with zero when using the class matrix constructor.
  • to list a matrix on the computer’ screen

Because the library matrix.h uses a matrix with constant dimensions, and the class matrix uses a dynamic declared matrix, defined with the help of a pointer, both versions of the creating function are described in this chapter.
Read the rest of this entry »

,

1 Comment

C and C++ library of functions and procedures for matrix (bidimensional arrays) processing – Introduction

Library source: C and C++ library of functions and procedures for matrix processing

Language: C / C++
Date: 04.2002
Authors: Catalin Boja si Niculescu Silviu
License: Creative Commons Attribution 3.0 License

This post main objective is to tackle a series of aspects regarding the creation of a library that contains functions necessary in resolving the problems with matrices.

First chapters are containing initialization, listing on screen and computing subprograms. The last ones present this problem objective approach.

It has been created a library specialized in matrix computation that it is used for resolving real life problems.

As this paper main approach is the matrix processing, it will be made some references that will help the user understanding this text and the programs.

Read the rest of this entry »

,

2 Comments