// ************************************ //
// find address before a given element //
// ************************************ //
FLOAT_POLY_CELL* FLOAT_POLY::get_before_element_address(unsigned int p)
{
FLOAT_POLY_CELL *temp;
if(!(head==NULL)){
temp = head;
if(p==temp->power){
//cout << "power is at head of list, so before address is NULL"
// << endl;
return(NULL);
}
while(!(temp->next==NULL)){
if(p==temp->next->power){
//temp is address of cell before cell containing search_key
return(temp);
}
temp = temp->next;
}
}
return(NULL);
}