Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi A - F > Algoritmi e strutture dati > [PROGETTO] "Mappe 2" Thread Rating: 1 votes, 5.00 average.
Pages (17): « First ... « 10 11 12 13 [14] 15 16 17 »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
maynard80
.novellino.

User info:
Registered: Jul 2007
Posts: 3 (0.00 al dì)
Location: Milano (e non interland, tendo a precisare)
Corso: informatica
Anno: SESTO
Time Online: 12 Days, 14:28:38 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ragazzi, ma a voi riduci quanto ci mette???? se do una specifica del tipo
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEENNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNN
il mio programma va davvero in crisi!! mi sa che ho sbagliato qualcosa..

__________________
msn Messenger: giamma80 at tiscali.it
ATHENA !

24-02-2006 11:06
Click Here to See the Profile for maynard80 Click here to Send maynard80 a Private Message Find more posts by maynard80 Add maynard80 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
MaurizioL
.simpatizzante.

User info:
Registered: Feb 2006
Posts: 17 (0.00 al dì)
Location: Omegna
Corso: Informatica
Anno: 2
Time Online: 3:44:01: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

C'è evidentemente qualcosa che non và, nei test che ti daranno per testare il programma potrebbero esserci specifiche anche di 30000 caratteri.

__________________
Maurizio Lombardi
Linux 2.6.14.2
-----------------------

24-02-2006 11:12
Click Here to See the Profile for MaurizioL Click here to Send MaurizioL a Private Message Find more posts by MaurizioL Add MaurizioL to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
maynard80
.novellino.

User info:
Registered: Jul 2007
Posts: 3 (0.00 al dì)
Location: Milano (e non interland, tendo a precisare)
Corso: informatica
Anno: SESTO
Time Online: 12 Days, 14:28:38 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by MaurizioL
C'è evidentemente qualcosa che non và, nei test che ti daranno per testare il programma potrebbero esserci specifiche anche di 30000 caratteri.


a quanto pare mi finisce la memoria.....

ad esempio su un cammino come
10,10 11,10 12,10 13,10 14,10 15,10 16,10 16,11 16,12 16,13 16,14 16,15 16,16
- il percorso ha 13 nodi
trovati 924 cammini di lunghezza minima tra cui 2 di peso massimo.

chiaro che 924 cammini sono un devasto per la memoria.... sopratutto per il fatto che alloco un nodo e non ne ho semplicemente un puntatore...

__________________
msn Messenger: giamma80 at tiscali.it
ATHENA !

24-02-2006 11:48
Click Here to See the Profile for maynard80 Click here to Send maynard80 a Private Message Find more posts by maynard80 Add maynard80 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Simeon
:D

User info:
Registered: Aug 2004
Posts: 984 (0.13 al dì)
Location: Milano
Corso: Informatica
Anno: IT IS OVER!
Time Online: 14 Days, 19:29:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by MaurizioL
C'è evidentemente qualcosa che non và, nei test che ti daranno per testare il programma potrebbero esserci specifiche anche di 30000 caratteri.


:schoked:

24-02-2006 12:15
Click Here to See the Profile for Simeon Click here to Send Simeon a Private Message Find more posts by Simeon Add Simeon to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Simeon
:D

User info:
Registered: Aug 2004
Posts: 984 (0.13 al dì)
Location: Milano
Corso: Informatica
Anno: IT IS OVER!
Time Online: 14 Days, 19:29:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by maynard80
a quanto pare mi finisce la memoria.....

ad esempio su un cammino come
10,10 11,10 12,10 13,10 14,10 15,10 16,10 16,11 16,12 16,13 16,14 16,15 16,16
- il percorso ha 13 nodi
trovati 924 cammini di lunghezza minima tra cui 2 di peso massimo.

chiaro che 924 cammini sono un devasto per la memoria.... sopratutto per il fatto che alloco un nodo e non ne ho semplicemente un puntatore...


924 cammini ? Hmm...

Boh a me sul tuo esempio va bello liscio

24-02-2006 12:16
Click Here to See the Profile for Simeon Click here to Send Simeon a Private Message Find more posts by Simeon Add Simeon to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
maynard80
.novellino.

User info:
Registered: Jul 2007
Posts: 3 (0.00 al dì)
Location: Milano (e non interland, tendo a precisare)
Corso: informatica
Anno: SESTO
Time Online: 12 Days, 14:28:38 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Simeon
924 cammini ? Hmm...

Boh a me sul tuo esempio va bello liscio


ehm...siccome sono un cretino non ho liberato lo spazio di tutti i dati che vengono distrutti durante il prog...

mi spiegate velocemente come usare la funzione free() ??? please!

__________________
msn Messenger: giamma80 at tiscali.it
ATHENA !

24-02-2006 12:28
Click Here to See the Profile for maynard80 Click here to Send maynard80 a Private Message Find more posts by maynard80 Add maynard80 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
MaurizioL
.simpatizzante.

User info:
Registered: Feb 2006
Posts: 17 (0.00 al dì)
Location: Omegna
Corso: Informatica
Anno: 2
Time Online: 3:44:01: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

free(puntatore alla struttura dati da eliminare);

__________________
Maurizio Lombardi
Linux 2.6.14.2
-----------------------

24-02-2006 12:30
Click Here to See the Profile for MaurizioL Click here to Send MaurizioL a Private Message Find more posts by MaurizioL Add MaurizioL to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Polsy
.arcimaestro.

User info:
Registered: Dec 2003
Posts: 477 (0.06 al dì)
Location:
Corso: Info phd
Anno:
Time Online: 17 Days, 17:11:50 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by maynard80
ehm...siccome sono un cretino non ho liberato lo spazio di tutti i dati che vengono distrutti durante il prog...

mi spiegate velocemente come usare la funzione free() ??? please!

hehehe il saggio dice:
feed the children, save the whales and free() the malloc()s

ps: ricorda che free() libera solo la memoria allocata per QUEL puntatore, per cui se hai ad esempio un albero non basta fare free sulla radice, ma devi fare una visita in postordine e liberare tutti i puntatori

24-02-2006 12:58
Click Here to See the Profile for Polsy Click here to Send Polsy a Private Message Visit Polsy's homepage! Find more posts by Polsy Add Polsy to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
maynard80
.novellino.

User info:
Registered: Jul 2007
Posts: 3 (0.00 al dì)
Location: Milano (e non interland, tendo a precisare)
Corso: informatica
Anno: SESTO
Time Online: 12 Days, 14:28:38 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ultimissima cosa, devo fare una lista di adiacenze che associano a tutti i nodi 1 o 2 adiacenze (che sono gli hop possibili per raggiungere un cammino) potete postare degli esempietti di codice?? costruisco una struttura con 2 puntatori alle adiacenze e un puntatore a next?? oppure mi conviene mettere nella struttura un array[2] con i puntatori alle 2 adiacenze?

sctruct nodoAdiacenze{
struct nodoAdiacenze *next;
struct nodo*X;
struct nodo*Y;
}

nodo è una struttura gia da me creata che memorizza tute le info sul nodo stesso;

__________________
msn Messenger: giamma80 at tiscali.it
ATHENA !

24-02-2006 14:43
Click Here to See the Profile for maynard80 Click here to Send maynard80 a Private Message Find more posts by maynard80 Add maynard80 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Diuzza
.illuminato.

User info:
Registered: Aug 2004
Posts: 169 (0.02 al dì)
Location:
Corso: Informatica
Anno: 2
Time Online: 1 Day, 8:30:45 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

E' possibile che quando malloc non va a buon fine ti termina l'esecuzione?

24-02-2006 14:50
Click Here to See the Profile for Diuzza Click here to Send Diuzza a Private Message Find more posts by Diuzza Add Diuzza to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
tandrea85
.precettore.

User info:
Registered: Sep 2004
Posts: 95 (0.01 al dì)
Location:
Corso: informatica
Anno: 1
Time Online: 18:21:48 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ma per la riduci bisogna per forza calcolare tutti i cammnini possibili da P a Q?

24-02-2006 15:56
Click Here to See the Profile for tandrea85 Click here to Send tandrea85 a Private Message Find more posts by tandrea85 Add tandrea85 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
YoMo
.precettore.

User info:
Registered: Oct 2004
Posts: 96 (0.01 al dì)
Location: Placentia
Corso: Info triennale
Anno: laureato
Time Online: 2 Days, 0:18:13 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by maynard80
ragazzi, ma a voi riduci quanto ci mette???? se do una specifica del tipo
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEENNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNN
il mio programma va davvero in crisi!! mi sa che ho sbagliato qualcosa..


Stai attento xche se la tua riduci è ricorsiva ti conviene rivederla xche con punti distanti i record d'attivazione aperti diventano insostenibli....
Fino a qlche gg fa avevo il tuo stesso problema e ho dovuto riprogettare la riduci da zero!

24-02-2006 18:30
Click Here to See the Profile for YoMo Click here to Send YoMo a Private Message Find more posts by YoMo Add YoMo to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
YoMo
.precettore.

User info:
Registered: Oct 2004
Posts: 96 (0.01 al dì)
Location: Placentia
Corso: Info triennale
Anno: laureato
Time Online: 2 Days, 0:18:13 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by maynard80
ultimissima cosa, devo fare una lista di adiacenze che associano a tutti i nodi 1 o 2 adiacenze (che sono gli hop possibili per raggiungere un cammino) potete postare degli esempietti di codice?? costruisco una struttura con 2 puntatori alle adiacenze e un puntatore a next?? oppure mi conviene mettere nella struttura un array[2] con i puntatori alle 2 adiacenze?

sctruct nodoAdiacenze{
struct nodoAdiacenze *next;
struct nodo*X;
struct nodo*Y;
}

nodo è una struttura gia da me creata che memorizza tute le info sul nodo stesso;


Quello che hai scritto potrebbe andare ma ti consiglio anche di valutare l'idea di una matrice di adiacenza a questo punto...
Cmq ti consiglio di guardare su http://www.algoteam.dsi.unimi.it/ magari trovi qlcosa di già fatto.

24-02-2006 18:45
Click Here to See the Profile for YoMo Click here to Send YoMo a Private Message Find more posts by YoMo Add YoMo to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Ari_85
.amico.

User info:
Registered: Aug 2005
Posts: 31 (0.00 al dì)
Location: Omegna
Corso: Informatica
Anno: 2
Time Online: 10:45:16 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Se volete un esempio di quanto è buono un algoritmo ricorsivo sappiate solo che se l'origine è 0,0 e la fine è 7,7 vi sono più di 3000 cammini possibili...è ovviamente esponenziale.

__________________
Good wombs hath borne bad sons

24-02-2006 18:47
Click Here to See the Profile for Ari_85 Click here to Send Ari_85 a Private Message Find more posts by Ari_85 Add Ari_85 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
YoMo
.precettore.

User info:
Registered: Oct 2004
Posts: 96 (0.01 al dì)
Location: Placentia
Corso: Info triennale
Anno: laureato
Time Online: 2 Days, 0:18:13 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Diuzza
E' possibile che quando malloc non va a buon fine ti termina l'esecuzione?


Secondo me è poco probabile....magari è un problema di free(), ti consiglio di far scorrere tutte le calloc e malloc che hai e controllare se hanno una corrispondente free. Altrimenti è il solito accesso al di fuori delle zone allocate.

24-02-2006 18:49
Click Here to See the Profile for YoMo Click here to Send YoMo a Private Message Find more posts by YoMo Add YoMo to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 20:36.    Post New Thread    Post A Reply
Pages (17): « First ... « 10 11 12 13 [14] 15 16 17 »   Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.048 seconds (79.55% PHP - 20.45% MySQL) con 26 query.