Particle function ( ) { Particle loc0 = new Particle ( problem , movementModel ) ; loc0 . movementModel = movementModel ; loc0 . position = position . duplicate ( ) ; loc0 . bestPosition = bestPosition . duplicate ( ) ; loc0 . velocity = velocity . clone ( ) ; loc0 . neighbors = neighbors . clone ( ) ; return loc0 ; }
creates a copy . concode_field_sep Problem problem concode_elem_sep MovementModel movementModel concode_elem_sep Solution bestPosition concode_elem_sep Particle[] neighbors concode_elem_sep Solution position concode_elem_sep double[] velocity concode_field_sep double getValue concode_elem_sep void move concode_elem_sep double[] getVelocity concode_elem_sep Solution getPosition concode_elem_sep void setNeighbors concode_elem_sep void setVelocity concode_elem_sep double getBestValue concode_elem_sep Solution getBestPosition concode_elem_sep Object clone concode_elem_sep void setBestPosition concode_elem_sep int compareTo concode_elem_sep Particle[] getNeighbors