fix de quelques warnings

git-svn-id: http://cregut.svn.enseeiht.fr/2020/1sn/pim/projets/GH-05@210408 e13453a9-b01f-0410-a051-f404c4f0c485
This commit is contained in:
lfainsin 2020-12-24 17:21:56 +00:00
parent 166c01d7c6
commit 8208062b99
7 changed files with 14 additions and 40 deletions

View file

@ -1,3 +1,4 @@
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
package body Google_Creux is
@ -43,7 +44,7 @@ package body Google_Creux is
col_CRS: Natural := 0;
col_vec: Natural := 0;
begin
initialize(new_vec, sum(vec)*(1.0-alpha)/T_Element(N));
Vector_Element.initialize(new_vec, Vector_Element.sum(vec)*(1.0-alpha)/T_Element(N));
for i in 0..N-1 loop
nb_col := mat.rows(i+1) - mat.rows(i);
if nb_col = 0 then

View file

@ -1,4 +1,3 @@
with Ada.Text_IO; use Ada.Text_IO;
with Vector;
generic
@ -18,15 +17,6 @@ generic
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 les modules Vector
use Vector_Element;
use Vector_Link;
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

View file

@ -1,5 +1,3 @@
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
package body Google_Naive is
function "*"(left : Vector_Element.T_Vecteur; right : T_Google) return Vector_Element.T_Vecteur is

View file

@ -22,10 +22,6 @@ package Google_Naive is
package Text_T_Element is
new Ada.Text_IO.Float_IO(Num => T_Element);
-- on utilise les modules Vector
use Vector_Element;
use Vector_Link;
type T_Google is array (0..N-1, 0..N-1) of T_Element;
function "*"(left: Vector_Element.T_Vecteur; right: T_Google) return Vector_Element.T_Vecteur;

View file

@ -59,7 +59,7 @@ begin
vec_natural(2) := 21;
vec_natural(3) := 3;
vec_natural(4) := 13;
vec_natural(5) := 2855030208059;
vec_natural(5) := 2855059;
vec_natural(6) := 3;
vec_natural(7) := 5;
vec_natural(8) := 6;

View file

@ -1,8 +1,10 @@
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
package body Vector is
package body Entier is
procedure initialize(vec: in out T_Vecteur; value: in Long_Natural) is
procedure initialize(vec: in out T_Vecteur; value: in Natural) is
begin
for i in 0..Capacite-1 loop
vec(i) := value;
@ -12,12 +14,12 @@ package body Vector is
procedure identity(vec: in out T_Vecteur) is
begin
for i in 0..Capacite-1 loop
vec(i) := Long_Natural(i);
vec(i) := i;
end loop;
end identity;
procedure flip(vec: in out T_Vecteur) is
tmp: Long_Natural;
tmp: Natural;
begin
for i in 0..Capacite/2-1 loop
tmp := vec(i);
@ -44,13 +46,13 @@ package body Vector is
procedure quicksort(vec: in out T_Vecteur; low: Natural := 0; high: Natural := Capacite-1) is
procedure swap(left, right: Natural) is
tmp : constant Long_Natural := vec(left);
tmp : constant Natural := vec(left);
begin
vec(left) := vec(right);
vec(right) := tmp;
end swap;
pivot : constant Long_Natural := vec(low);
pivot : constant Natural := vec(low);
right : Natural := high;
left : Natural := low;
@ -181,7 +183,7 @@ package body Vector is
procedure swap(left, right: Natural) is
tmp : constant T_Digit := vec(left);
tmp_index : constant Long_Natural := vec_index(left);
tmp_index : constant Natural := vec_index(left);
begin
vec(left) := vec(right);
vec(right) := tmp;

View file

@ -1,6 +1,4 @@
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO;
with Ada.Long_Integer_Text_IO;
package Vector is
@ -10,14 +8,9 @@ package Vector is
package Entier is
subtype Long_Natural is Long_Integer range 0 .. Long_Integer'Last; -- plus nécéssaire après implèm Links, TODO
-- on permet l'affichage des entiers.
use Ada.Long_Integer_Text_IO;
type T_Vecteur is array (0..Capacite-1) of Natural;
type T_Vecteur is array (0..Capacite-1) of Long_Natural;
procedure initialize(vec: in out T_Vecteur; value: in Long_Natural);
procedure initialize(vec: in out T_Vecteur; value: in Natural);
procedure identity(vec: in out T_Vecteur);
procedure flip(vec: in out T_Vecteur);
@ -41,10 +34,7 @@ package Vector is
-- on permet l'affichage direct des T_Digit
package Text_T_Element is
new Ada.Text_IO.Float_IO(Num => T_Digit);
use Text_T_Element;
-- on importe les vecteurs d'entiers
use Vector_Entier;
use Text_T_Element;
type T_Vecteur is array (0..Capacite-1) of T_Digit;
@ -74,9 +64,6 @@ package Vector is
from: Natural;
to: Natural;
end record;
-- on permet l'affichage des entiers.
use Ada.Integer_Text_IO;
type T_Vecteur is array (0..Capacite-1) of T_Link;