public final class Word extends java.lang.Object implements MonoidElem<Word>
Modifier and Type | Field and Description |
---|---|
protected int |
hash
Stored hash code.
|
WordFactory |
mono
Defining alphabet in WordFactory.
|
Constructor and Description |
---|
Word(WordFactory m)
Constructor for Word.
|
Word(WordFactory m,
java.lang.String s)
Constructor for Word.
|
Word(WordFactory m,
java.lang.String s,
boolean translate)
Constructor for Word.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Word V)
Word compareTo.
|
Word |
copy()
Copy this.
|
long |
degree()
Word degree.
|
java.util.SortedMap<java.lang.String,java.lang.Integer> |
dependencyOnVariables()
Word dependency on letters.
|
Word |
divide(Word V)
Word divide.
|
Word |
divideLeft(Word V)
Word divide left.
|
Word |
divideRight(Word V)
Word divide right.
|
boolean |
divides(Word V)
Word divides test.
|
Word[] |
divideWord(Word V)
Word divide with prefix and suffix.
|
Word[] |
divideWord(Word V,
boolean first)
Word divide with prefix and suffix.
|
boolean |
equals(java.lang.Object B)
Comparison with any other object.
|
MonoidFactory<Word> |
factory()
Get the corresponding element factory.
|
char |
getVal(int i)
Get the letter at position i.
|
int |
gradCompareTo(Word V)
Word graded comparison.
|
int |
gradInvlexCompareTo(Word V)
Word graded comparison.
|
int |
hashCode()
hashCode.
|
static java.util.SortedMap<java.lang.String,java.lang.Integer> |
histogram(java.lang.String v)
String dependency on letters.
|
Word |
inverse()
Word inverse.
|
boolean |
isONE()
Is Word one.
|
boolean |
isOverlap(Overlap ol,
Word V)
Is word overlap.
|
boolean |
isUnit()
Is Word unit.
|
Word |
lcm(Word V)
Word pseudo least common multiple.
|
ExpVector |
leadingExpVector()
Word leading exponent vector.
|
int |
length()
Get the length of this word.
|
boolean |
multipleOf(Word V)
Word multiple test.
|
Word |
multiply(Word V)
Word multiplication.
|
OverlapList |
overlap(Word V)
Word overlap list.
|
Word[] |
quotientRemainder(Word S)
Quotient and remainder by division of this by S.
|
Word |
reductum()
Word without leading exponent vector.
|
Word |
remainder(Word V)
Word remainder.
|
int |
signum()
Word signum.
|
java.lang.String |
toScript()
Get a scripting compatible string representation.
|
java.lang.String |
toScriptFactory()
Get a scripting compatible string representation of the factory.
|
java.lang.String |
toString()
Get the string representation.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
leftDivide, leftRemainder, power, rightDivide, rightRemainder, twosidedDivide, twosidedRemainder
public final WordFactory mono
protected int hash
public Word(WordFactory m)
m
- factory for words.public Word(WordFactory m, java.lang.String s)
m
- factory for words.s
- Stringpublic Word(WordFactory m, java.lang.String s, boolean translate)
m
- factory for words.s
- Stringtranslate
- indicator if s needs translationpublic MonoidFactory<Word> factory()
factory
in interface Element<Word>
Element.factory()
public char getVal(int i)
i
- position.public int length()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public java.lang.String toScript()
toScript
in interface Element<Word>
Element.toScript()
public java.lang.String toScriptFactory()
toScriptFactory
in interface Element<Word>
Element.toScriptFactory()
public boolean equals(java.lang.Object B)
public int hashCode()
public boolean isONE()
isONE
in interface MonoidElem<Word>
public boolean isUnit()
isUnit
in interface MonoidElem<Word>
public Word multiply(Word V)
multiply
in interface MonoidElem<Word>
V
- other word.public Word divide(Word V)
divide
in interface MonoidElem<Word>
V
- other word.public Word divideLeft(Word V)
V
- other word.public Word divideRight(Word V)
V
- other word.public Word[] divideWord(Word V)
V
- other word.public Word[] divideWord(Word V, boolean first)
V
- other word.first
- is true for first index, false for last index.public Word remainder(Word V)
remainder
in interface MonoidElem<Word>
V
- other word.public Word[] quotientRemainder(Word S)
quotientRemainder
in interface MonoidElem<Word>
S
- a Wordpublic Word inverse()
inverse
in interface MonoidElem<Word>
public int signum()
public long degree()
public java.util.SortedMap<java.lang.String,java.lang.Integer> dependencyOnVariables()
public static java.util.SortedMap<java.lang.String,java.lang.Integer> histogram(java.lang.String v)
v
- string.public ExpVector leadingExpVector()
public Word reductum()
public boolean multipleOf(Word V)
V
- other word.public boolean divides(Word V)
V
- other word.public int gradCompareTo(Word V)
V
- other word.public int gradInvlexCompareTo(Word V)
V
- other word.public boolean isOverlap(Overlap ol, Word V)
ol
- = [l1,r1,l2,r2] an Overlap container of four wordsV
- wordpublic OverlapList overlap(Word V)
V
- other word.