Esempio n. 1
0
 def test_uniform_vector(self):
     mut.UniformVectorX()
     mut.UniformVectorX([-0.5, -5.0], [0.5, 5.0])
     dut = mut.UniformVectorX(min=[-1.0, -10.0], max=[1.0, 10.0])
     dut.min = [-2.0, -20.0]
     dut.max = [2.0, 20.0]
     self._check_distribution_vector(dut)
 def test_distribution_vector_variant(self):
     """Confirms that the free functions that operate on a vector variant
     are bound."""
     items = [
         mut.DeterministicVectorX(value=[1.0]),
         mut.GaussianVectorX(mean=[1.0], stddev=[0.1]),
         mut.UniformVectorX(min=[-1.0], max=[1.0]),
     ]
     for item in items:
         copied = mut.ToDistributionVector(item)
         self._check_distribution_vector(copied)
         if mut.IsDeterministic(vec=item):
             mut.GetDeterministicValue(vec=item)