[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Forumosky • Leggi argomento - Trovare il massimo e il minimo di una matrice triangolare

Trovare il massimo e il minimo di una matrice triangolare

L'Informatica riguarda i computer tanto quanto l'Astronomia riguarda i telescopi

Moderatore: albertao

Matrici

Messaggioda albertao » ven apr 08, 2005 1:37 am

Ultima modifica di albertao il ven apr 08, 2005 2:33 pm, modificato 4 volte in totale.
Read what I mean, not what I write.
Avatar utente
albertao
Entità suprema
 
Messaggi: 220
Iscritto il: ven feb 04, 2005 1:38 am
Località: Caprino Veronese (VR)

Messaggioda dariosky » ven apr 08, 2005 3:18 am

Avatar utente
dariosky
Perditempo DOC
 
Messaggi: 510
Iscritto il: gio feb 03, 2005 4:41 pm
Località: Padova

Messaggioda dariosky » sab apr 09, 2005 2:53 pm

Allora una piccola nota prima di postare il codice di chiarimento al testo:
1. La matrice triangolare ha elementi solo per una metà (la metà sopra in questo caso) della matrice... l'altra metà è indifferente (e nel post di albertao è segnata con i puntini)

2. I valori da trovare sono sostanzialmente il valore PIU' PICCOLO e il valore PIU' GRANDE di tutta la matrice...

3. Per scegliere la posizione dei piu' (piccoli/grandi) da restituire si preferiscono quelle piu' vicine all'angolo in alto a dx... per es. se il valore piu' grande si presenta 2 volte, una volta vicino alla posizione in alto a dx, e una volta distante... si preferirà quella vicina!
Avatar utente
dariosky
Perditempo DOC
 
Messaggi: 510
Iscritto il: gio feb 03, 2005 4:41 pm
Località: Padova

Triama.py

Messaggioda dariosky » sab apr 09, 2005 3:02 pm

Avatar utente
dariosky
Perditempo DOC
 
Messaggi: 510
Iscritto il: gio feb 03, 2005 4:41 pm
Località: Padova

Messaggioda albertao » sab apr 09, 2005 3:08 pm

Read what I mean, not what I write.
Avatar utente
albertao
Entità suprema
 
Messaggi: 220
Iscritto il: ven feb 04, 2005 1:38 am
Località: Caprino Veronese (VR)

Messaggioda dariosky » sab apr 09, 2005 4:58 pm

Tempo di test...
i test sono stati effettuati su una matrice 2048x2048 generata grazie al programmuzzo createMatrix.pl di Albertao (che se vuole lo posterà), che risulta in un file da 39Mb !!!
I tempi (non l'ho ancora specificato x gli altri test) sono i minori dopo un tot di lanci misurati con "time" di Linux...

Ecco i risultati:
time ./triama.pl rmat.txt 19.14s
time ./triama.py rmat.txt 11.85s
Avatar utente
dariosky
Perditempo DOC
 
Messaggi: 510
Iscritto il: gio feb 03, 2005 4:41 pm
Località: Padova


Torna a Algoritmica e programmazione

Chi c’è in linea

Visitano il forum: Nessuno e 1 ospite