Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.61 KB | None | 0 0
  1. kdtree get_feuille(kdtree arbre,color* colorI){
  2.     int couleur = colorI[arbre->axeD];
  3.     if( (arbre->left_son == NULL) && (arbre->right_son == NULL) ){
  4.         return(arbre);
  5.     }
  6.    
  7.     if( arbre->table->colorSequence[arbre->axeD + arbre->table->dim*arbre->planC] <= couleur ){
  8.         if( (arbre->left_son != NULL) && (arbre->right_son != NULL) ){
  9.             return(get_feuille(arbre->right_son,colorI));
  10.         }
  11.     }
  12.    
  13.     if( arbre->table->colorSequence[arbre->axeD + arbre->table->dim*arbre->planC] > couleur ){
  14.         if( (arbre->left_son != NULL) && (arbre->right_son != NULL) ){
  15.             return(get_feuille(arbre->left_son,colorI));
  16.         }
  17.                
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement