Beispiel #1
0
 def get_num_points(ell: Ellipsoid, factor_vec: Union[float, np.ndarray]) -> int:
     n_dims = ell.dimension([ell])
     if n_dims == 2:
         return int(ell.get_n_plot_2d_points([ell]).flat[0] * factor_vec)
     else:
         return int(ell.get_n_plot_3d_points([ell]).flat[0] * factor_vec[n_dims - 2])
Beispiel #2
0
 def ellipsoid(self, *args, **kwargs):
     return Ellipsoid(*args, **kwargs)
Beispiel #3
0
def ell_unitball(n: int):
    return Ellipsoid(np.eye(n))