Changeset 3686:cdcfb5cd6aa7 in orange


Ignore:
Timestamp:
05/23/07 19:02:48 (7 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
e1f4b7da5c5a368188a2ca03ab461cd971370d01
Message:

new cooling schedule

Location:
source/orangeom
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • source/orangeom/networkoptimization.cpp

    r3685 r3686  
    6969        cout << endl; 
    7070    } 
     71 
     72    coolFactor = 0.96; 
    7173} 
    7274 
     
    9395    double kk = 1; 
    9496    double **disp = (double**)malloc(nVertices * sizeof (double)); 
     97    double localTemparature = 5; 
    9598 
    9699    for (i = 0; i < nVertices; i++) 
     
    193196            //pos[v][1] = min((double)height, max((double)0, pos[v][1])); 
    194197        } 
    195  
    196         temperature = temperature * 0.96; 
     198        //cout << temperature << ", "; 
     199        temperature = temperature * coolFactor; 
    197200    } 
    198201 
     
    203206        disp[i] = NULL; 
    204207    } 
    205  
     208    //cout << endl; 
    206209    free(disp); 
    207210    disp = NULL; 
     
    445448 
    446449    graph->temperature = temperature; 
     450    graph->coolFactor = exp(log(0.04) / steps); 
    447451     
    448452    if (graph->fruchtermanReingold(steps) > 0) 
  • source/orangeom/networkoptimization.hpp

    r3685 r3686  
    8989    float k2; //PR 
    9090    double temperature; 
     91    double coolFactor; 
    9192    int width; //P 
    9293    int height; //PR 
Note: See TracChangeset for help on using the changeset viewer.