changeset 336:124f85c6cfae

modifed default probability to float
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Fri, 14 Jun 2013 13:47:00 -0400
parents 3950bfe22768
children dc2e68e936c7
files python/prediction.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/python/prediction.py	Fri Jun 14 11:47:24 2013 -0400
+++ b/python/prediction.py	Fri Jun 14 13:47:00 2013 -0400
@@ -37,7 +37,7 @@
     '''Predicted trajectory at constant speed or acceleration
     TODO generalize by passing a series of velocities/accelerations'''
 
-    def __init__(self, initialPosition, initialVelocity, control = moving.NormAngle(0,0), probability = 1, maxSpeed = None):
+    def __init__(self, initialPosition, initialVelocity, control = moving.NormAngle(0,0), probability = 1., maxSpeed = None):
         self.control = control
         self.maxSpeed = maxSpeed
         self.probability = probability
@@ -49,7 +49,7 @@
 
 class PredictedTrajectoryNormalAdaptation(PredictedTrajectory):
     '''Random small adaptation of vehicle control '''
-    def __init__(self, initialPosition, initialVelocity, accelerationDistribution, steeringDistribution, probability = 1, maxSpeed = None):
+    def __init__(self, initialPosition, initialVelocity, accelerationDistribution, steeringDistribution, probability = 1., maxSpeed = None):
         '''Constructor
         accelerationDistribution and steeringDistribution are distributions 
         that return random numbers drawn from them'''