[Lazarus] up with Lazarus !

2021-12-01 Thread Etienne Leblois via lazarus
We love Lazarus and Pascal programming and anyone's best effort on this 
is deeply acknowledged.


Let us stick to the topic that unites us.

Etienne

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] storing big dynamic matrices in file ?

2023-08-27 Thread Etienne Leblois via lazarus

Dear all,

I want to manipulate, store, later retrieve, 2-dimensions matrices of 
single or double ;


matrices may turn big and I wanted to turn to dynamic array of array

the basic solution below works, but storing (and retrieval) of big 
matrices is VERY slow.


any hint on the good way to make things quick ?


var

  fsingle : file of single;
  m : array of array of single;
  i,j,n:integer;

begin

n:=1;

// I like i and j to run in 1..n, so I accept to loose line and column 0
setlength(m,1+n,1+n);

for i:=1 to n do for j:=1 to n do M[i,j]:=random;

assignfile(fsingle,'single_test.bin');
rewrite(fsingle);
for i:=1 to n do for j:=1 to n do   write(fsingle,M[i,j]);
closefile(fsingle);

end;

Thank you in advance,

Etienne (Lyon, France)

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus