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 "Componenti Elettroniche"
Pages (9): « First ... « 5 6 7 8 [9]   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
carla86
.illuminato.

User info:
Registered: Dec 2006
Posts: 219 (0.03 al dì)
Location: Milano
Corso: Informatica
Anno: Terzo
Time Online: 6 Days, 21:40:54 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by kermit63
vorrei usare l'implementazione del prof degli alberiRB, ma non riesco a capire (C non e' il mio forte) cosa passare come terzo argomento in un eventuale main di prova alla funz inorder.
qualcuno puo' illuminarmi?

void inord(rbnode *p, rbnode *nil, void (*op)(rbnode *))

{

if(p != nil) {

inord(p->left,nil,op);

(*op)(p);

inord(p->right,nil,op);

}

}



void inorder(rbtree *p, void (*op)(rbnode *))

{

inord(p->root, p->nil, op);

}


ho avuto anke io lo stesso problema fino a quando nn ho capito ke il terzo argomento sarebbe una funzione ke gli vuoi passare... in realtà puoi anke omettere il terzo argomento.
se ti servi per stampare metti in mezzo alle due chiamate inord la printf.

21-06-2010 13:20
Click Here to See the Profile for carla86 Click here to Send carla86 a Private Message Find more posts by carla86 Add carla86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
kermit63
.simpatizzante.

User info:
Registered: Nov 2009
Posts: 16 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 13:14:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

grazie carla86!
finalmente ho capito come funziona il passaggio di parametri funzione

21-06-2010 14:05
Click Here to See the Profile for kermit63 Click here to Send kermit63 a Private Message Find more posts by kermit63 Add kermit63 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Guepe
.fedelissimo.

User info:
Registered: Feb 2007
Posts: 54 (0.01 al dì)
Location: Milano
Corso: informatica F49
Anno: 3
Time Online: 1 Day, 10:04:49 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ma qualcuno che sta dando il progetto il 24???
Sto impazzendo un po sulla funzione prospetto perché non so in che struttura dati inserire il prospetto visto che poi la funzione costominimo dovrà lavorarci e non poco....voi che avete usato?

22-06-2010 10:52
Click Here to See the Profile for Guepe Click here to Send Guepe a Private Message Find more posts by Guepe Add Guepe to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
L3D
.novellino.

User info:
Registered: Jul 2005
Posts: 8 (0.00 al dì)
Location: Milano
Corso: informatica
Anno:
Time Online: 3:37:43 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
progetto del 24 ?!

Io devo dare il progetto del 24 ma sto letteralmente impazzendo per la creazione della funzione "costominimo" qualcuno ha da dare suggerimenti ? sono ben Accetti!!!



Prima mia ipotesi creare TUTTE le combinazioni possibili e prendere quella con costo minore.. Dobrebbe dare un risultato corretto ma il prof ha detto che nn è Ottimale..

Seconda utilizzare Programmazione dinamica ? quale soluzione verrebbe fuori ? cmq sia la ricorsione nn andrebbe a fare la combinazione cmq di tutti i casi ?

23-06-2010 19:40
Click Here to See the Profile for L3D Click here to Send L3D a Private Message Find more posts by L3D Add L3D to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
kermit63
.simpatizzante.

User info:
Registered: Nov 2009
Posts: 16 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 13:14:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

suggerimento per il costominimo:
io uso un grafo pesato, con nodi pari agli elementi del prospetto. ad ogni nodo aggiungo la sua lista di nodi adiacenti, prendendoli dal gruppo successivo nel prospetto e calcolando il peso del cammino. il peso e' dato dalla somma dei costi dei due nodi + l'eventuale costo della famiglia di destinazione se le famiglie sono diverse. ottenuto il grafo pesato calcolo il cammino minimo da ogni sorgente (saranno pochi) e nel caso sia minore del precedente lo sostituisco.
l'unico problema e' che devo ancora implementarlo.. aiuto !!

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

User info:
Registered: Nov 2009
Posts: 16 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 13:14:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

per il cammino minimo usero' Dijkstra, ovviamente :)

24-06-2010 07:38
Click Here to See the Profile for kermit63 Click here to Send kermit63 a Private Message Find more posts by kermit63 Add kermit63 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
L3D
.novellino.

User info:
Registered: Jul 2005
Posts: 8 (0.00 al dì)
Location: Milano
Corso: informatica
Anno:
Time Online: 3:37:43 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

+ o - ho capito come fai tu..
o come farai :P.. penserò ancora un pò e poi vedo che fare.

24-06-2010 08:47
Click Here to See the Profile for L3D Click here to Send L3D a Private Message Find more posts by L3D Add L3D to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 22:19.    Post New Thread    Post A Reply
Pages (9): « First ... « 5 6 7 8 [9]   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.073 seconds (55.37% PHP - 44.63% MySQL) con 24 query.