public class RootsGenerator extends Object implements TermGenerator
Modifier and Type | Field and Description |
---|---|
private BigInteger |
one |
private ProjectionToTerm |
powerRelation |
private TermBuilder |
tb |
private BigInteger |
two |
Modifier | Constructor and Description |
---|---|
private |
RootsGenerator(ProjectionToTerm powerRelation,
TermBuilder tb) |
Modifier and Type | Method and Description |
---|---|
private Term |
breakDownEq(Term var,
BigInteger lit,
int pow,
TermServices services) |
private Term |
breakDownGeq(Term var,
BigInteger lit,
int pow,
TermServices services) |
private Term |
breakDownLeq(Term var,
BigInteger lit,
int pow,
TermServices services) |
static TermGenerator |
create(ProjectionToTerm powerRelation,
TermServices services) |
private Iterator<Term> |
emptyIterator() |
Iterator<Term> |
generate(RuleApp app,
PosInOccurrence pos,
Goal goal) |
private BigInteger |
posRoot(BigInteger prod,
int exp) |
private BigInteger |
power(BigInteger base,
int exp) |
private BigInteger |
root(BigInteger prod,
int exp) |
private BigInteger |
rootRoundingUpwards(BigInteger prod,
int exp) |
private Iterator<Term> |
toIterator(Term res) |
private final ProjectionToTerm powerRelation
private final TermBuilder tb
private final BigInteger one
private final BigInteger two
private RootsGenerator(ProjectionToTerm powerRelation, TermBuilder tb)
public static TermGenerator create(ProjectionToTerm powerRelation, TermServices services)
public Iterator<Term> generate(RuleApp app, PosInOccurrence pos, Goal goal)
generate
in interface TermGenerator
private Term breakDownEq(Term var, BigInteger lit, int pow, TermServices services)
private Term breakDownGeq(Term var, BigInteger lit, int pow, TermServices services)
private Term breakDownLeq(Term var, BigInteger lit, int pow, TermServices services)
private BigInteger rootRoundingUpwards(BigInteger prod, int exp)
private BigInteger root(BigInteger prod, int exp)
private BigInteger posRoot(BigInteger prod, int exp)
private BigInteger power(BigInteger base, int exp)