Vector and Transformation Utilities vecnorm- Normalisation of Vectors. vecmag- Magnitude of Vectors. vecmag2- Squared Magnitude of the vectors. vecangle- Alternative to atan2 (0 <= angle <= 2*pi). vecdot- Dot p
These convert between the standard 3-d vector representation and their equivalent quaternions, which allows them to be manipulated as vectors — as inR * from_vector_part(v) * R.conjugate(). However, note that you may not need to convert to/from quaternions. For example, to rotate vectorsv...
The input is given in the form of astructured arrayin numpy. The first four fields of the input arrayvectorsmust be either: np.dtype([('pT','f8'), ('eta','f8'), ('phi','f8'), ('mass','f8')]) or ifcluster(..., ep=True): ...
Q[self.find_index(self.last_state)][self.last_action] #print old_action self.Q[index] = old_action + self.alpha * (self.last_reward + self.gamma * np.argmax(self.Q[index]) - old_action) self.last_action = np.argmax(self.Q[index]) # else: # self.last_action = random....
# intersect manifold with vantage vectors # calculate distance dist_A_alpha = dist_A dist_B_alpha = dist_B # calculate lambda # sinusoid taking as input the angle between vantage and line AB (separating the two targets) line_AB = np3_to_vector3(PAB).perpendicular() angle_A = py_ang...