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 "FACCIALIBRO"
Pages (28): « First ... « 17 18 19 20 [21] 22 23 24 25 » ... Last »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
Bloom
.illuminato.

User info:
Registered: May 2006
Posts: 229 (0.03 al dì)
Location:
Corso:
Anno:
Time Online: 2 Days, 3:14:49 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Io lo consegno a marzo perche lavorando non ho molto tempo per studiare

22-02-2009 13:45
Click Here to See the Profile for Bloom Click here to Send Bloom a Private Message Find more posts by Bloom Add Bloom to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Shaper
.consigliere.

User info:
Registered: Sep 2007
Posts: 147 (0.02 al dì)
Location: Milano
Corso: Informatica
Anno: Secondo anno
Time Online: 1 Day, 11:23:27 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Bloom
Ma non è più semplice avere un albero rb per i profili e per ogni profilo avere una lista di adiacenza?
Oppure anche accoppiata grafo/liste può andare bene secondo me


Beh, io l'avevo pensato così perchè, dal momento che dovrò scansire piuttosto spesso la lista di amici, usando un abero rb velocizzerei l'operazione...
Però in alternativa potrei anche fare una albero per i profili e, separatamente, un array con liste di adiacenza, contenente puntatori ai nodi del grafo..
Però anche in questo modo mi pare un po' contorto..

__________________
Eidolon64|Blog

22-02-2009 13:46
Click Here to See the Profile for Shaper Click here to Send Shaper a Private Message Visit Shaper's homepage! Find more posts by Shaper Add Shaper to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Bloom
.illuminato.

User info:
Registered: May 2006
Posts: 229 (0.03 al dì)
Location:
Corso:
Anno:
Time Online: 2 Days, 3:14:49 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Beh...il progetto è un pochetto contorto :-D

22-02-2009 13:48
Click Here to See the Profile for Bloom Click here to Send Bloom a Private Message Find more posts by Bloom Add Bloom to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
hyperion
.illuminato.

User info:
Registered: Oct 2007
Posts: 171 (0.03 al dì)
Location:
Corso: Informatica
Anno:
Time Online: 3 Days, 12:37:41 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Joy88
Sì forse hai ragione..
per ogni profilo faccio una lista di amici..
così la lista rientrerebbe come campo del profilo..
Mi sembra + facile..!!!
Grazie!!
Bloom com'è andato il tuo progetto???


per l'albero delle amicizie fai esattamente quello che faresti se usassi una lista di adiacenza...come ha detto già bloom hai il tuo nodo e nel nodo un puntatore all'albero delle amicizie del nodo...
se usi le liste fai lo stesso..solo che invece che avere un puntatore ad un rb hai un puntatore ad una lista

22-02-2009 13:50
Click Here to See the Profile for hyperion Click here to Send hyperion a Private Message Find more posts by hyperion Add hyperion to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
hyperion
.illuminato.

User info:
Registered: Oct 2007
Posts: 171 (0.03 al dì)
Location:
Corso: Informatica
Anno:
Time Online: 3 Days, 12:37:41 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Shaper
Beh, io l'avevo pensato così perchè, dal momento che dovrò scansire piuttosto spesso la lista di amici, usando un abero rb velocizzerei l'operazione...
Però in alternativa potrei anche fare una albero per i profili e, separatamente, un array con liste di adiacenza, contenente puntatori ai nodi del grafo..
Però anche in questo modo mi pare un po' contorto..


dikstra non ti serve secondo me....al massimo potresti usarlo assegnando ad ogni collegamento tra nodi peso unitario...cioè sarebbe un inutile spreco e ti complichi di più la vita...fai una semplice bfs!

22-02-2009 13:51
Click Here to See the Profile for hyperion Click here to Send hyperion a Private Message Find more posts by hyperion Add hyperion to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Shaper
.consigliere.

User info:
Registered: Sep 2007
Posts: 147 (0.02 al dì)
Location: Milano
Corso: Informatica
Anno: Secondo anno
Time Online: 1 Day, 11:23:27 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Bloom
Beh...il progetto è un pochetto contorto :-D


Sì, effettivamente non si cava sangue dalle rape! :D
Alla fine fino ad ora io l'ho fatto esattamente nel modo che hai consigliato a Joy un paio di post fa, adesso devo solo capire come infilarci quel maledetto grado di separazione!! :evil:

__________________
Eidolon64|Blog

22-02-2009 13:51
Click Here to See the Profile for Shaper Click here to Send Shaper a Private Message Visit Shaper's homepage! Find more posts by Shaper Add Shaper to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
hyperion
.illuminato.

User info:
Registered: Oct 2007
Posts: 171 (0.03 al dì)
Location:
Corso: Informatica
Anno:
Time Online: 3 Days, 12:37:41 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Joy88
Ho un albero x i profili..
e x ogni nick voglio fare un albero degli amici di nick (ponendo nick come radice)..
Bloom esattamente quello che hai detto..!!
Però come posso accedere ad un albero con radice pietro +ttosto che uno con radice carlo??

..in alternativa.. dici di fare in un altro modo??


i tuoi nodi avranno un campo puntatore ad un Rb generico....quando crei cioè aggiungi un profilo,crei il nodo nell rb principale e poi allochi lo spazio per i sottoalberi!
tipo:

void crea_profilo{

.......


rbtree* albero_amicici = nuovo_albero();

.......

}

dove nuovo_albero crea un nuovo rb e restituisce puntatore alla radice...in questo modo il tuo campo albero_amicici di ogni nodo/profilo punterà ad una radice di un sottoalbero



quindi facendo uan ricerca nel rb principale ottieni il profilo tizio..e per scorrere il sottoalbero degli amici semplicemente sai che hai un campo alber_amici che punta al sottoalbero delle amicizie...le operazioni normali come inserimento/cancellazione di un amico le fai utilizzando come radice proprio albero_amicici

Last edited by hyperion on 22-02-2009 at 13:58

22-02-2009 13:55
Click Here to See the Profile for hyperion Click here to Send hyperion a Private Message Find more posts by hyperion Add hyperion to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Gehur
.grande:maestro.

User info:
Registered: Apr 2006
Posts: 519 (0.07 al dì)
Location: Milano
Corso: Informatica
Anno:
Time Online: 3 Days, 0:41:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Joy88
Ho un albero x i profili..
e x ogni nick voglio fare un albero degli amici di nick (ponendo nick come radice)..
Bloom esattamente quello che hai detto..!!
Però come posso accedere ad un albero con radice pietro +ttosto che uno con radice carlo??

..in alternativa.. dici di fare in un altro modo??


io non userei nick come radice dell'albero amici, quando inserisci un nuovo profilo metti il campo amici a NULL, quando devi inserire un nuovo amico, come radice avrai il campo amici del profilo,ovviamente amici deve essere un tipo nodo albero

quando dovrai cercare un amico di nick, basta fare una ricerca partendo da nick->amici..sempre usando strcmp visto che sono stringhe

22-02-2009 15:13
Click Here to See the Profile for Gehur Click here to Send Gehur a Private Message Find more posts by Gehur Add Gehur to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Shaper
.consigliere.

User info:
Registered: Sep 2007
Posts: 147 (0.02 al dì)
Location: Milano
Corso: Informatica
Anno: Secondo anno
Time Online: 1 Day, 11:23:27 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Gehur
io non userei nick come radice dell'albero amici, quando inserisci un nuovo profilo metti il campo amici a NULL, quando devi inserire un nuovo amico, come radice avrai il campo amici del profilo,ovviamente amici deve essere un tipo nodo albero

quando dovrai cercare un amico di nick, basta fare una ricerca partendo da nick->amici..sempre usando strcmp visto che sono stringhe


..o in alternativa il campo amici è un puntatore a un albero contenente gli amici dell'utente nick. Io di primo acchito l'ho pensato così..

__________________
Eidolon64|Blog

22-02-2009 18:57
Click Here to See the Profile for Shaper Click here to Send Shaper a Private Message Visit Shaper's homepage! Find more posts by Shaper Add Shaper to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
hyperion
.illuminato.

User info:
Registered: Oct 2007
Posts: 171 (0.03 al dì)
Location:
Corso: Informatica
Anno:
Time Online: 3 Days, 12:37:41 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Shaper
..o in alternativa il campo amici è un puntatore a un albero contenente gli amici dell'utente nick. Io di primo acchito l'ho pensato così..


per forza..che tu lo faccia con liste o alberi..

22-02-2009 19:02
Click Here to See the Profile for hyperion Click here to Send hyperion a Private Message Find more posts by hyperion Add hyperion to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Shaper
.consigliere.

User info:
Registered: Sep 2007
Posts: 147 (0.02 al dì)
Location: Milano
Corso: Informatica
Anno: Secondo anno
Time Online: 1 Day, 11:23:27 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by hyperion
per forza..che tu lo faccia con liste o alberi..


Sì certo, ho detto una cosa piuttosto inutile, era solo una puntualizzazione sul tipo del campo.. Il concetto comunque è chiaro..:-D

__________________
Eidolon64|Blog

22-02-2009 19:10
Click Here to See the Profile for Shaper Click here to Send Shaper a Private Message Visit Shaper's homepage! Find more posts by Shaper Add Shaper to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Gehur
.grande:maestro.

User info:
Registered: Apr 2006
Posts: 519 (0.07 al dì)
Location: Milano
Corso: Informatica
Anno:
Time Online: 3 Days, 0:41:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ecco si,è quello che intendevo

piuttosto qualcuno mi sa dire cosa serve il campo predecessore nell'algoritmo di visita grafo in ampiezza bfs.. ho buttato una bozza in C dell'algoritmo presente sul libro a pg 455, ma non ho usato il capo pigreco, non ne vedo l'utilità..

22-02-2009 19:48
Click Here to See the Profile for Gehur Click here to Send Gehur a Private Message Find more posts by Gehur Add Gehur to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Bloom
.illuminato.

User info:
Registered: May 2006
Posts: 229 (0.03 al dì)
Location:
Corso:
Anno:
Time Online: 2 Days, 3:14:49 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ciao A tutti,
nell'input di esempio del progetto c'è scritto "System" a posto di "system".
Ho mandato un'email al professore e mi ha detto che tutti i comandi iniziano con la lettera minuscola(quindi "system")

Ciao
Laura

23-02-2009 08:23
Click Here to See the Profile for Bloom Click here to Send Bloom a Private Message Find more posts by Bloom Add Bloom to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Shaper
.consigliere.

User info:
Registered: Sep 2007
Posts: 147 (0.02 al dì)
Location: Milano
Corso: Informatica
Anno: Secondo anno
Time Online: 1 Day, 11:23:27 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Bloom
Ciao A tutti,
nell'input di esempio del progetto c'è scritto "System" a posto di "system".
Ho mandato un'email al professore e mi ha detto che tutti i comandi iniziano con la lettera minuscola(quindi "system")

Ciao
Laura


Grazie dell'avvertimento! :approved:

__________________
Eidolon64|Blog

23-02-2009 08:40
Click Here to See the Profile for Shaper Click here to Send Shaper a Private Message Visit Shaper's homepage! Find more posts by Shaper Add Shaper to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Bloom
.illuminato.

User info:
Registered: May 2006
Posts: 229 (0.03 al dì)
Location:
Corso:
Anno:
Time Online: 2 Days, 3:14:49 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Shaper
Grazie dell'avvertimento! :approved:


di nada
Dovere :-D

23-02-2009 08:44
Click Here to See the Profile for Bloom Click here to Send Bloom a Private Message Find more posts by Bloom Add Bloom to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 00:26.    Post New Thread    Post A Reply
Pages (28): « First ... « 17 18 19 20 [21] 22 23 24 25 » ... Last »   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.128 seconds (51.33% PHP - 48.67% MySQL) con 24 query.