* @return the result
*/
public static Tensor collectScalarFactorsInProduct(Product product) {
if (TensorUtils.isSymbolic(product))
return product;
ScalarsBackedProductBuilder builder = new ScalarsBackedProductBuilder(product.size(), 1, product.getIndices().getFree().size());
builder.put(product);
return builder.build();
}