void animate(ArrayList<Node> nodes,int start,int end, float interpolation,boolean highlight){    	  
    	  Node n1 = nodes.get(this.node1);
    	  Node n2 = nodes.get(this.node2);
    	  int startPersistence = this.persistence.get(start);
    	  int endPersistence = this.persistence.get(end);
    	  
    	  int interpolationAmt = 0;      
    	  if (startPersistence==1 && endPersistence==1){
    		  interpolationAmt = 255;
    	  }else if (startPersistence==0 && endPersistence==1){ //Fading in
    		  interpolationAmt = easeInExpo(interpolation,0,255,1);    		
    	  } else if (startPersistence==1 && endPersistence==0) { //Fading out    		  
    		  interpolationAmt = easeOutExpo((1-interpolation),0,255,1);    		  
    	  }
    	  
    	  //If highlight is set to true, colour the edge as blue
    	  if (highlight){
    		  parent.strokeWeight(2);    	
        	  parent.stroke(presentColour.getRed(),presentColour.getGreen(),presentColour.getBlue(),interpolationAmt); 
    		  parent.line(n1.x,n1.y,n2.x,n2.y);
    	  }else{
    		  drawEdge(n1.x,n1.y,n2.x,n2.y,interpolationAmt,1.5f);
    	  }
      }