553a31bf39
git-svn-id: http://cregut.svn.enseeiht.fr/2020/1sn/pim/projets/GH-05@210321 e13453a9-b01f-0410-a051-f404c4f0c485
35 lines
888 B
Ada
35 lines
888 B
Ada
with Ada.Text_IO; use Ada.Text_IO;
|
|
with Vector;
|
|
|
|
generic
|
|
|
|
type T_Element is digits <>;
|
|
N: Positive;
|
|
N_links: Positive;
|
|
with package Vector_T_Element is new Vector(T_Element => T_Element, N => N);
|
|
|
|
package Google_Creux is
|
|
|
|
-- on permet l'affichage direct des T_Element
|
|
package Text_T_Element is
|
|
new Ada.Text_IO.Float_IO(Num => T_Element);
|
|
use Text_T_Element;
|
|
|
|
-- on utilise le module Vector
|
|
use Vector_T_Element;
|
|
|
|
type T_Rows is array (0..N) of Natural;
|
|
type T_Cols is array (0..N_links-1) of Natural;
|
|
type T_Google is record
|
|
cols: T_Cols;
|
|
rows: T_Rows;
|
|
end record;
|
|
|
|
function calcul(vec: T_Vecteur_Element; mat :T_Google; alpha: in T_Element) return T_Vecteur_Element;
|
|
|
|
procedure create_H(mat: in out T_Google; file: in out Ada.Text_IO.File_Type);
|
|
|
|
procedure put(mat: in T_Google);
|
|
|
|
end Google_Creux;
|