Make graphs sparser

This commit is contained in:
serso
2016-04-20 15:56:10 +02:00
parent 557c04df89
commit 65d05ca60d
5 changed files with 32 additions and 19 deletions

View File

@@ -1,5 +1,14 @@
package jscl.math;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import jscl.math.function.Constant;
import jscl.math.function.Fraction;
import jscl.math.function.Inverse;
@@ -14,10 +23,6 @@ import jscl.text.ParserUtils;
import jscl.text.msg.Messages;
import jscl.util.ArrayUtils;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.*;
public class Expression extends Generic {
protected static final com.google.common.base.Function<Variable, Generic> FACTORIZE_CONVERTER = new com.google.common.base.Function<Variable, Generic>() {
@@ -105,7 +110,7 @@ public class Expression extends Generic {
return expression;
}
public static Expression valueOf(@Nonnull Double value) {
public static Expression valueOf(double value) {
final Expression expression = new Expression(1);
Literal literal = new Literal();
literal.init(new DoubleVariable(new NumericWrapper(Real.valueOf(value))), 1);