/** * This method resets all tensor names in the namespace. * <p/> * <p>Any tensor created before this method call becomes invalid, and * must not be used! This method is mainly used in unit tests, so * avoid invocations of this method in general computations.</p> */ public synchronized void resetTensorNames() { nameManager.reset(); }
/** * This method resets all tensor names in the namespace and sets a * specified seed to the {@link NameManager}. If this method is invoked * with constant seed before any interactions with Redberry, further * behaviour of Redberry will be fully deterministic from run to run * (order of summands and multipliers will be fixed, computation time * will be pretty constant, hash codes will be the same). * <p/> * <p>Any tensor created before this method call becomes invalid, and * must not be used! This method is mainly used in unit tests, so * avoid invocations of this method in general computations.</p> */ public synchronized void resetTensorNames(long seed) { nameManager.reset(seed); }