From: Sia b. <sia...@gm...> - 2008-01-30 03:25:55
|
Hi, Actually wanted to remove edges from the network.I have a problem when removing edges. I would be telling the actual lines of code of what am i doing and what is the problem? iterable<RepastEdg<agent>> iter= network.getEdges();//here network is normal network iterator it=iter.iterator(); while(it.hasNext()){ it.remove() } here it.remove() general way of removing elements in the collection. this is gives an exception when this method of remove is not applicable on the iterator. so what would be the way to way to sweep out the edges of one network.i have tried all the general ways like using arraylist and vectors but i would get an error saying that iterator object cant be casted to arraylist and vectors. So by using this technique how can we remove edges where as in repast aren't there any in built methods to remove edge? Is there some other method to take out edges from a network. Any pointers on this would be really apprreciable. I had given the code so as to let know whether this is a good approach to remove edges and also to know what am i doing to remove edges. -- Regards, Rama |