C++
What is the blank file stdafx.h here for?
How is the array operations organized in C++?
Why are round brackets used when addressing arrays, not square brackets?
Will the ALGLIB package work in 64-bit environment?

Delphi
Why is while cycle used instead of the for cycle?
What is the purpose of the DynamicArrayCopy function?

Visual Basic
What version of Visual Basic are the algorithms translated into?
Will the programs from the site work in VB.NET?
Why is the goto operator used in some programs?

General Questions on source codes
How reliable is the ALGLIB package?
What is the AP library?
What is the ABLAS library?
What do module statuses (experimental, development, stable, obsolete) mean?
What is the difference between alglib.stable and alglib.full archives?
Why do some algorithms (for instance, optimization methods) use reverse communication instead of function pointers, delegates and other means of my programming language?

General questions
What is ALGLIB aimed at?
What is the difference between ALGLIB and other similar projects?
Who are the authors of the ALGLIB?
What relation does the website have to Russia?
What is AlgoPascal?
Where can I find the algorithms for the work with files, drawing pictures in OpenGL, etc?


C++

What is the blank file stdafx.h here for?

MSVC and some other compilers require the #include <stdafx.h> directive in the program code to manage precompiled headers, and create the stfafx.h file when generating a new project. However, some compilers (e.g. BCB) use other tools to manage precompiled headers. In this case the #include <stdafx.h> directive as such doesn't hinder their operation, however if the file with this name is absent, a compilation error occurs. The blank file called stfafx.h is created to avoid this error. If your development environment already created the file, leave it unchanged.

How is the array operations organized in C++?

As there is no dynamic array support in C++ (update: I know about pointers and dynamic memory allocation, but this is not exactly the thing we need here), template classes were developed to work with one- and two-dimensional arrays. The necessary source code and description can be found in the standard AP library, which is supplied with ALGLIB sources. Please note that the array numeration in this library begins from any number the programmer chooses rather than from 0.

Why are round brackets used when addressing arrays, not square brackets?

Imagine you are addressing the a matrix element in the common notation: a[x][y] instead of a(x,y). Actually there are two index operators called here instead of one. The first is indexing of a matrix by x, that returns a reference to a temporary structure that describes the matrix row. The second is indexing that temporary structure by y, which returns the reference to the needed element. Addressing through overloading the round brackets is much more effective, as no temporary structures are required.

Will the ALGLIB package work in 64-bit environment?

The ALGLIB package was not tested in 64-bit environment.

However, the package itself and the AP/C++ library it uses don't contain any code that explicitly points out the environment it should work in. Thus, in theory compiling and usage of ALGLIB package in a 64-bit environment should not cause any trouble when not using additional libraries (like ABLAS, which is at the moment intended to work only in 32-bit environments).

Delphi

Why is while cycle used instead of the for cycle?

The reason for that is some peculiarities of the for cycle in Delphi. If the cycle has not been executed yet, in many programming languages the control variable of the cycle contains the initial value. In Delphi, if the cycle has not been executed, the control variable of the cycle doesn't change. Once I have seen a source code, in which this difference played a major role. That's why decided to replace the for cycle in Delphi with while cycle, whose behavior is the same as in any other language.

What is the purpose of the DynamicArrayCopy function?

In Delphi dynamic arrays are reference types, i.e. if the array parameter is passed by value, no copying of the array occurs. To emulate the transfer of the array parameter by value we use the DynamicArrayCopy function. It requires a dynamic array as an argument and returns a copy of this array. Assignment of the type A:=DynamicArrayCopy(A) replaces the reference to the original array with a reference to its copy.

Visual Basic

What version of Visual Basic are the algorithms translated into?

The algorithms are translated into VBA, but in general are compatible with VB6.

Will the programs from the site work in VB.NET?

Not unless they are manually ported.

Why is the goto operator used in some programs?

In many programming languages there is control operator continue, but it is absent in VB. In AlgoPascal, this operator appears from time to time. The goto operator is used to replace it and go to the next iteration of the cycle.

General Questions on source codes

How reliable is the ALGLIB package?

The following measures are taken to ensure the reliability of the ALGLIB package:

What is the AP library?

AP library is a generic name for a set of libraries in several programming languages performing low-level tasks depending on specific programming languages. The AP library carries out tasks such as working with dynamic one- and multidimensional arrays in languages which do not support this data type, contains implementation of basic linear algebra algorithms, etc. The library is distributed as source codes under GPL 2+ license (GPL 2 or later). The library is attached to each algorithm package available for downloading from the web-site. The latest library version is available for downloading from http://alglib.sources.ru/translator/aplib.zip

What is the ABLAS library?

ABLAS is an optimized implementation of basic linear algebra subroutines written in assembler. To use ABLAS it is necessary to copy the DLL file to one of the system folders or in the program folder and turn on ABLAS support (as described in ABLAS manual). When launching a program that is using the ALGLIB package, the ABLAS library is automatically detected and loaded. If ABLAS is absent, the program uses the standard implementation of linear algebra operations, written in a high-level language. At http://www,alglib.net/projects/ablas/ (or http://alglib.sources.ru/projects/ablas/ in Russian) there is library description, the list of the supported platforms and programming languages as well as source code and precompiled binary files.

What is the difference between alglib.stable and alglib.full archives?

A 'stable' archive contains only 'stable' modules . A 'full' archive also contains modules with 'experimental' and 'development' status.

What do module statuses (experimental, development, stable, obsolete) mean?

Modules included into ALGLIB can have a different status depending on the lifecycle stage they are in:

Why do some algorithms (for instance, optimization methods) use reverse communication instead of function pointers, delegates and other means of my programming language?

Optimization, integration and other similar methods are united by one common trait. They need to have a way of calculating the meaning of a function defined by the user at a point defined by the method.

The most convenient way of solving this problem is transferring a function pointer into the module. However bear in mind that ALGLIB package is written using pseudo code that is automatically translated into different programming languages. While each language has its own function pointer analog that is often different from other languages. When the ALGLIB pseudo code was developed, at some point is became clear that adding function pointers in it will be very complex as this feature is implemented differently in every language. This is why reverse communication was chosen as a different kind of solution.

General questions

What is ALGLIB aimed at?

It is mostly aimed at creating a convenient and efficient multilingual scientific software library.

What is the difference between ALGLIB and other similar projects?

The ALGLIB package:

Now on what ALGLIB is not and is not going to be. ALGLIB doesn't:

Who are the authors of the ALGLIB?

The first version of ALGLIB was made by Vladimir Bystritsky. He spent a number of years on the maintenance of the website by himself. Eventually, he lost his interest in the website, so I (Sergey Bochkanov) took over the work on its maintenance, by common agreement.

What relation does the website have to Russia?

Originally, ALGLIB was a Russian-language website. Later on, a part of the website was translated into English. At present, there are two versions of the site - Russian and English.

What is AlgoPascal?

AlgoPascal is a programming language, designed particularly for this project. The programs, written in this language, are processed by a server-side automatic translator and translated into other programming languages by the computer. More detailed information is provided in section "About the site".

Where can I find the algorithms for the work with files, drawing pictures in OpenGL, etc?

As we noted before, the main goal of ALGLIB is to create a multilingual library of algorithms in the area of numerical analysis. The problems, related to those enumerated in the question, do not fall into this category. Exceptions are made for a number of problems, though the project can be characterized by a clear-cut specialization.