model_server/gedge/src/constr_node.cxx
// sergey 08/25/92 - modified: zeroed positions in equal nodes + environment
sergey 08/25/92 - modified: zeroed positions in equal nodes + environment
sergey 08 / 25 / 92 - modified : zeroed positions in equal nodes + environment
void constr_node::clear() {  
     constr_node* n = net->first_constr;
     if ( neighborhood != 0){
       delete neighborhood; neighborhood = 0;
     }
     if (position != 0){
       while (n = n->next){      
           if ( n == this || n->position == NULL )
	       continue;
	   if (n->position != position){    
               if (n->position->environment == this->position->environment)
                   n->position->environment = 0;
           }
           else
               n->position = 0;
       }
       delete position; position = 0;
     }
}
void constr_node :: clear ( ) { constr_node * n = net -> first_constr ; if ( neighborhood != 0 ) { delete neighborhood ; neighborhood = 0 ; } if ( position != 0 ) { while ( n = n -> next ) { if ( n == this || n -> position == NULL ) continue ; if ( n -> position != position ) { if ( n -> position -> environment == this -> position -> environment ) n -> position -> environment = 0 ; } else n -> position = 0 ; } delete position ; position = 0 ; } }
sergey 08/25/92 - modified: zeroed positions in equal nodes + environment
sergey 08 / 25 / 92 - modified : zeroed positions in equal nodes + environment
//     clear common environment to be deleted only once  // clear for all but this // but envir. can be the same