Archive for February, 2010

How to: Transform a Mathematical Expression from Infix Writing to Postfix Writing in C++

Postfix writing (Reverse Polish Form) was made by Polish mathematician Jan Łukasiewicz. Particularities of this form of writing mathematical expressions are presented in [...].
An algorithm for transforming a writing mathematical expressions from infix to postfix writing was developed by Edsger Dijkstra (Dijkstra Shunting Algorithm).
Read the rest of this entry »

, , , ,

1 Comment

How to: Evaluate a Mathematical Expression in Postfix Writing in C++

Postfix writing [...] is a form of representation of mathematical expressions in which arithmetic operatorsare written specified by operands.
Advantages of postfix writing over prefix and infix writing:

  • Highlights clear policy of making operations;
  • Brackets for forcing priority for implementing operators are not necessary;
  • Evaluations are easily performed by computer.

Read the rest of this entry »

, , , ,

1 Comment

Librarie de functii si proceduri pentru lucru cu matrici (masive bidimensionale) in limbajul C si C++ – Citire si Afisare

Pentru realizarea calculului matriceal este necesara existenta matricei sau matricelor. Crearea necorespunzatoare a obiectului de lucru, si anume matricea, duce la efecte total neasteptate. De aceea, pentru a fi lipsiti de neplaceri, atentia acordata acestor functii este maxima.

In calculul matriceal sunt incluse si functii de intrare si iesire. Aceste functii realizeaza:

  • crearea matricei, fie de la consola ca in cazul bibliotecii matrice.h, fie initializata cu zero ca in cazul clasei matrix( constructorul cu parametrii);
  • afisarea matricei pe ecran.

Cum in biblioteca de functii matrice.h se lucreaza cu o matrice de dimensiuni constante, iar in clasa matrix se utilizeaza o variabila de tip pointer, deci dinamic, sunt prezentate ambele moduri de creare( dinamic si static).

In continuare se prezinta functiile care realizeaza creare matricei. In practica se observa, ca pe langa matricea dorita, sunt folosite o serie de matrice ajutatoare cum ar fi matricea unitate, matricea booleana, matricea cu 1 pe o linie si in rest zero etc.. Functiile de creare a acestor matrice sunt functii de intrare, iar afisarea lor este realizata tot cu functii de iesire.
Read the rest of this entry »

,

1 Comment

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

Librarie de functii si proceduri pentru lucru cu matrici (masive bidimensionale) in limbajul C si C++ – Introducere

Library source: Librarie de functii si proceduri pentru lucru cu matrici in limbajul C si C++

Limbaj programare: C / C++
Data: 04.2002
Autori: Catalin Boja si Niculescu Silviu
Licenta: Creative Commons Attribution 3.0 License

Lucrarea de fata isi propune sa abordeze o serie de aspecte legate de construirea unei biblioteci de proceduri pentru solutionarea de probleme in care apar ca operanzi matricele. Primele capitole grupeaza subprograme pentru initializare, afisare, calcul matriceal. Ultimele capitole prezinta abordarea obiectuala a acestei probleme.S-a procedat la crearea unei biblioteci specializate pe calcule matriceale si la utilizarea in solutionarea de probleme practice.

Read the rest of this entry »

,

3 Comments

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

Tutorial Limbaj de Asamblare (Assembler) Intel 8086 – Partea 8 – Lucru in virgula mobila (valori reale)

In acest tutorial destinat imbajului de asamblare pentru procesoare din familia Intel 8086 sunt prezentate modalitatile de lucru cu variabile si constante reale. Acest set de valori, in virgule mobila, necesita o alta abordare decat exemplele cu valori intregi din tutoarialele anterioare deoarece prelucrarile sunt realizate de catre coprocesorul matematic.

Read the rest of this entry »

,

No Comments

Tutorial Limbaj de Asamblare (Assembler) Intel 8086 – Partea 7 – Lucru cu segmente

 

In acest tutorial destinat imbajului de asamblare pentru procesoare din familia Intel 8086 sunt prezentate modalitatile de lucru cu segmente. Aceasta abordare permite realizarea de aplicatii compexe in care datele si codul nu sunt limitate doar la un singur segment.
Read the rest of this entry »

,

No Comments

Tutorial Limbaj de Asamblare (Assembler) Intel 8086 – Partea 6 – Lucru cu fisiere

In acest tutorial destinat imbajului de asamblare pentru procesoare din familia Intel 8086 sunt prezentate modalitatile de lucru cu fisiere:

  • Creare fisier
  • Inchidere fisier
  • Deschidere fisier
  • Scriere in fisier
  • Citire din fisier
  • Pozitionare in fisier
  • Extindere jump-uri de tip short

Read the rest of this entry »

,

1 Comment

Tutorial Limbaj de Asamblare (Assembler) Intel 8086 – Partea 5 – Proceduri

In acest tutorial destinat imbajului de asamblare pentru procesoare din familia Intel 8086 sunt prezentate procedurile. Acestea permit reutilizarea codului si reducerea dimensiunii acestuia insa implica un efort suplimentar generat de trimiterea parametrilor si apel. Read the rest of this entry »

,

1 Comment