Renamed math objects to Getậl infix.
This commit is contained in:
parent
56b6d8a681
commit
1578c214d2
|
@ -1,24 +0,0 @@
|
||||||
package love.distributedrebirth.demo4d.base2t;
|
|
||||||
|
|
||||||
public class VŌṁglyphDiamond extends VŌṁglyph<VŌṁglyphDiamond> {
|
|
||||||
|
|
||||||
// 0th = 1 * V144Tocta (1)
|
|
||||||
// 1th = 1+3 * V144Tocta (4)
|
|
||||||
// 2th = 1+3+6 * V144Tocta (10)
|
|
||||||
// 3th = 1+3+6+14 * V144Tocta (24)
|
|
||||||
// etc
|
|
||||||
|
|
||||||
public VŌṁglyphDiamond(byte level) {
|
|
||||||
super(level);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected int resolveFractalLevel(byte level) {
|
|
||||||
// TODO
|
|
||||||
return level;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected VŌṁglyphDiamond toCloneFractal(byte level) {
|
|
||||||
return new VŌṁglyphDiamond(level);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
package love.distributedrebirth.demo4d.base2t;
|
|
||||||
|
|
||||||
public class VŌṁglyphHyperStar extends VŌṁglyph<VŌṁglyphHyperStar> {
|
|
||||||
|
|
||||||
// 0th = V144Tocta
|
|
||||||
// 1th = 5 * V144Tocta
|
|
||||||
// 2th = 5 * 12 * V144Tocta
|
|
||||||
// etc
|
|
||||||
|
|
||||||
public VŌṁglyphHyperStar(byte level) {
|
|
||||||
super(level);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected int resolveFractalLevel(byte level) {
|
|
||||||
// TODO
|
|
||||||
return level;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected VŌṁglyphHyperStar toCloneFractal(byte level) {
|
|
||||||
return new VŌṁglyphHyperStar(level);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -3,6 +3,9 @@ package love.distributedrebirth.demo4d.fraction4d;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import love.distributedrebirth.demo4d.base2t.BaseNumberTyte;
|
||||||
|
import love.distributedrebirth.demo4d.base2t.T08PartOctalBaseAppender;
|
||||||
|
import love.distributedrebirth.demo4d.base2t.T08PartOctalBaseIterator;
|
||||||
import love.distributedrebirth.demo4d.base2t.V009Tyte;
|
import love.distributedrebirth.demo4d.base2t.V009Tyte;
|
||||||
import love.distributedrebirth.demo4d.base2t.V009TyteBaseAppender;
|
import love.distributedrebirth.demo4d.base2t.V009TyteBaseAppender;
|
||||||
import love.distributedrebirth.demo4d.base2t.V009TyteBaseIterator;
|
import love.distributedrebirth.demo4d.base2t.V009TyteBaseIterator;
|
||||||
|
@ -13,7 +16,7 @@ import love.distributedrebirth.demo4d.base2t.V144Tocta;
|
||||||
* @author willemtsade ©Δ∞ 仙上主天
|
* @author willemtsade ©Δ∞ 仙上主天
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class GroßGetậl {
|
public class GroßGetậl implements BaseNumberTyte<GroßGetậl> {
|
||||||
|
|
||||||
public static int NUMERATOR_SIZE = 7;
|
public static int NUMERATOR_SIZE = 7;
|
||||||
public static int DENOMINATOR_SIZE = 9;
|
public static int DENOMINATOR_SIZE = 9;
|
||||||
|
@ -29,6 +32,24 @@ public class GroßGetậl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GroßGetậl(T08PartOctalBaseIterator values) {
|
||||||
|
for (int i=0;i<NUMERATOR_SIZE;i++) {
|
||||||
|
numerator[i] = new V009Tyte(values);
|
||||||
|
}
|
||||||
|
for (int i=0;i<DENOMINATOR_SIZE;i++) {
|
||||||
|
denominator[i] = new V009Tyte(values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public GroßGetậl(V009TyteBaseIterator values) {
|
||||||
|
for (int i=0;i<NUMERATOR_SIZE;i++) {
|
||||||
|
numerator[i] = values.next();
|
||||||
|
}
|
||||||
|
for (int i=0;i<DENOMINATOR_SIZE;i++) {
|
||||||
|
denominator[i] = values.next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public GroßGetậl(V144Tocta tocta) {
|
public GroßGetậl(V144Tocta tocta) {
|
||||||
List<V009Tyte> tytes = new ArrayList<>();
|
List<V009Tyte> tytes = new ArrayList<>();
|
||||||
tocta.fillTyteValues(new V009TyteBaseAppender(tytes));
|
tocta.fillTyteValues(new V009TyteBaseAppender(tytes));
|
||||||
|
@ -41,15 +62,36 @@ public class GroßGetậl {
|
||||||
}
|
}
|
||||||
|
|
||||||
public V144Tocta toTocta() {
|
public V144Tocta toTocta() {
|
||||||
List<V009Tyte> tytes = new ArrayList<>();
|
return new V144Tocta(cloneIterator());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getBitCount() {
|
||||||
|
return V144Tocta.BIT_COUNT;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GroßGetậl toClone() {
|
||||||
|
return new GroßGetậl(cloneIterator());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void fillOctalValues(T08PartOctalBaseAppender appender) {
|
||||||
for (int i=0;i<NUMERATOR_SIZE;i++) {
|
for (int i=0;i<NUMERATOR_SIZE;i++) {
|
||||||
tytes.add(numerator[i]);
|
numerator[i].fillOctalValues(appender);
|
||||||
}
|
}
|
||||||
for (int i=0;i<DENOMINATOR_SIZE;i++) {
|
for (int i=0;i<DENOMINATOR_SIZE;i++) {
|
||||||
tytes.add(denominator[i]);
|
denominator[i].fillOctalValues(appender);
|
||||||
}
|
}
|
||||||
V009TyteBaseIterator iterator = new V009TyteBaseIterator(tytes.iterator());
|
}
|
||||||
V144Tocta result = new V144Tocta(iterator);
|
|
||||||
return result;
|
@Override
|
||||||
|
public void fillTyteValues(V009TyteBaseAppender appender) {
|
||||||
|
for (int i=0;i<NUMERATOR_SIZE;i++) {
|
||||||
|
appender.add(numerator[i]);
|
||||||
|
}
|
||||||
|
for (int i=0;i<DENOMINATOR_SIZE;i++) {
|
||||||
|
appender.add(denominator[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,20 @@
|
||||||
package love.distributedrebirth.demo4d.base2t;
|
package love.distributedrebirth.demo4d.fraction4d;
|
||||||
|
|
||||||
abstract public class VŌṁglyph<V extends VŌṁglyph<V> & BaseNumber<V>> implements BaseNumber<V> {
|
import love.distributedrebirth.demo4d.base2t.BaseNumber;
|
||||||
|
import love.distributedrebirth.demo4d.base2t.T08PartOctalBaseAppender;
|
||||||
|
import love.distributedrebirth.demo4d.base2t.T08PartOctalBaseIterator;
|
||||||
|
import love.distributedrebirth.demo4d.base2t.V144Tocta;
|
||||||
|
|
||||||
private V144Tocta[] values;
|
abstract public class GroßGetậlŌṁglyph<V extends GroßGetậlŌṁglyph<V> & BaseNumber<V>> implements BaseNumber<V> {
|
||||||
|
|
||||||
|
private GroßGetậl[] values;
|
||||||
private int valuesLength;
|
private int valuesLength;
|
||||||
private byte fractalLevel;
|
private byte fractalLevel;
|
||||||
|
|
||||||
public VŌṁglyph(byte fractalLevel) {
|
public GroßGetậlŌṁglyph(byte fractalLevel) {
|
||||||
this.fractalLevel = fractalLevel;
|
this.fractalLevel = fractalLevel;
|
||||||
this.valuesLength = resolveFractalLevel(fractalLevel);
|
this.valuesLength = resolveFractalLevel(fractalLevel);
|
||||||
this.values = new V144Tocta[valuesLength];
|
this.values = new GroßGetậl[valuesLength];
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract protected int resolveFractalLevel(byte level);
|
abstract protected int resolveFractalLevel(byte level);
|
||||||
|
@ -32,11 +37,11 @@ abstract public class VŌṁglyph<V extends VŌṁglyph<V> & BaseNumber<V>> impl
|
||||||
return part;
|
return part;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final V144Tocta getValue(int part) {
|
public final GroßGetậl getValue(int part) {
|
||||||
return values[validatePartRequest(part)];
|
return values[validatePartRequest(part)];
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void setValue(int part, V144Tocta value) {
|
public final void setValue(int part, GroßGetậl value) {
|
||||||
values[validatePartRequest(part)] = value;
|
values[validatePartRequest(part)] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +52,7 @@ abstract public class VŌṁglyph<V extends VŌṁglyph<V> & BaseNumber<V>> impl
|
||||||
V result = toCloneFractal(getFractalLevel());
|
V result = toCloneFractal(getFractalLevel());
|
||||||
T08PartOctalBaseIterator clonedOctals = cloneIterator();
|
T08PartOctalBaseIterator clonedOctals = cloneIterator();
|
||||||
for (int i=0;i<getValuesLength();i++) {
|
for (int i=0;i<getValuesLength();i++) {
|
||||||
result.setValue(i, new V144Tocta(clonedOctals));
|
result.setValue(i, new GroßGetậl(clonedOctals));
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -59,7 +64,7 @@ abstract public class VŌṁglyph<V extends VŌṁglyph<V> & BaseNumber<V>> impl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final void fillOctalValues(T08PartOctalBaseAppender appender) {
|
public final void fillOctalValues(T08PartOctalBaseAppender appender) {
|
||||||
for (V144Tocta value:values) {
|
for (GroßGetậl value:values) {
|
||||||
value.fillOctalValues(appender);
|
value.fillOctalValues(appender);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
package love.distributedrebirth.demo4d.fraction4d;
|
||||||
|
|
||||||
|
public class GroßGetậlŌṁglyphDiamond extends GroßGetậlŌṁglyph<GroßGetậlŌṁglyphDiamond> {
|
||||||
|
|
||||||
|
// 0th = 1 * V144Tocta (1)
|
||||||
|
// 1th = 1+3 * V144Tocta (4)
|
||||||
|
// 2th = 1+3+6 * V144Tocta (10)
|
||||||
|
// 3th = 1+3+6+14 * V144Tocta (24)
|
||||||
|
// etc
|
||||||
|
|
||||||
|
public GroßGetậlŌṁglyphDiamond(byte level) {
|
||||||
|
super(level);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected int resolveFractalLevel(byte level) {
|
||||||
|
// TODO
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected GroßGetậlŌṁglyphDiamond toCloneFractal(byte level) {
|
||||||
|
return new GroßGetậlŌṁglyphDiamond(level);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
package love.distributedrebirth.demo4d.fraction4d;
|
||||||
|
|
||||||
|
public class GroßGetậlŌṁglyphHyperStar extends GroßGetậlŌṁglyph<GroßGetậlŌṁglyphHyperStar> {
|
||||||
|
|
||||||
|
// 0th = V144Tocta
|
||||||
|
// 1th = 5 * V144Tocta
|
||||||
|
// 2th = 5 * 12 * V144Tocta
|
||||||
|
// etc
|
||||||
|
|
||||||
|
public GroßGetậlŌṁglyphHyperStar(byte level) {
|
||||||
|
super(level);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected int resolveFractalLevel(byte level) {
|
||||||
|
// TODO
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected GroßGetậlŌṁglyphHyperStar toCloneFractal(byte level) {
|
||||||
|
return new GroßGetậlŌṁglyphHyperStar(level);
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,7 +4,6 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import love.distributedrebirth.demo4d.base2t.T04PartQuad;
|
import love.distributedrebirth.demo4d.base2t.T04PartQuad;
|
||||||
import love.distributedrebirth.demo4d.base2t.V018Tord;
|
|
||||||
import love.distributedrebirth.demo4d.base2t.V036Teger;
|
import love.distributedrebirth.demo4d.base2t.V036Teger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,24 +13,24 @@ import love.distributedrebirth.demo4d.base2t.V036Teger;
|
||||||
*/
|
*/
|
||||||
public class Gê̄ldGetậl {
|
public class Gê̄ldGetậl {
|
||||||
|
|
||||||
private final HebrewDigit nummerAlphabet;
|
private final Gê̄ldGetậlHebrew nummerAlphabet;
|
||||||
private final HebrewDigit nummerDeelA;
|
private final Gê̄ldGetậlHebrew nummerDeelA;
|
||||||
private final HebrewDigit nummerDeelB;
|
private final Gê̄ldGetậlHebrew nummerDeelB;
|
||||||
private final HebrewDigit nummerDeelC;
|
private final Gê̄ldGetậlHebrew nummerDeelC;
|
||||||
private final double totalDecimalValue;
|
private final double totalDecimalValue;
|
||||||
private static final Character LEFT_TO_RIGHT_MARK = 0x200E;
|
private static final Character LEFT_TO_RIGHT_MARK = 0x200E;
|
||||||
private static final Character RIGHT_TO_LEFT_MARK = 0x200F;
|
private static final Character RIGHT_TO_LEFT_MARK = 0x200F;
|
||||||
|
|
||||||
public Gê̄ldGetậl(V036Teger teger) {
|
public Gê̄ldGetậl(V036Teger teger) {
|
||||||
this(
|
this(
|
||||||
new HebrewDigit(teger.getTytePart(T04PartQuad.PART_1)),
|
new Gê̄ldGetậlHebrew(teger.getTytePart(T04PartQuad.PART_1)),
|
||||||
new HebrewDigit(teger.getTytePart(T04PartQuad.PART_2)),
|
new Gê̄ldGetậlHebrew(teger.getTytePart(T04PartQuad.PART_2)),
|
||||||
new HebrewDigit(teger.getTytePart(T04PartQuad.PART_3)),
|
new Gê̄ldGetậlHebrew(teger.getTytePart(T04PartQuad.PART_3)),
|
||||||
new HebrewDigit(teger.getTytePart(T04PartQuad.PART_4))
|
new Gê̄ldGetậlHebrew(teger.getTytePart(T04PartQuad.PART_4))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Gê̄ldGetậl(HebrewDigit nummerAlphabet, HebrewDigit nummerDeelA, HebrewDigit nummerDeelB, HebrewDigit nummerDeelC) {
|
public Gê̄ldGetậl(Gê̄ldGetậlHebrew nummerAlphabet, Gê̄ldGetậlHebrew nummerDeelA, Gê̄ldGetậlHebrew nummerDeelB, Gê̄ldGetậlHebrew nummerDeelC) {
|
||||||
this.nummerAlphabet = nummerAlphabet;
|
this.nummerAlphabet = nummerAlphabet;
|
||||||
this.nummerDeelA = nummerDeelA;
|
this.nummerDeelA = nummerDeelA;
|
||||||
this.nummerDeelB = nummerDeelB;
|
this.nummerDeelB = nummerDeelB;
|
||||||
|
@ -49,9 +48,9 @@ public class Gê̄ldGetậl {
|
||||||
if (money.length() > 8) { // RL + 4 chars + 3 vowels
|
if (money.length() > 8) { // RL + 4 chars + 3 vowels
|
||||||
throw new IllegalArgumentException("Money length should not exceed 8 codepoints");
|
throw new IllegalArgumentException("Money length should not exceed 8 codepoints");
|
||||||
}
|
}
|
||||||
List<HebrewDigit> result = new ArrayList<>();
|
List<Gê̄ldGetậlHebrew> result = new ArrayList<>();
|
||||||
|
|
||||||
HebrewDigit geldDigit = null;
|
Gê̄ldGetậlHebrew geldDigit = null;
|
||||||
for (int i=0;i<money.length();i++) {
|
for (int i=0;i<money.length();i++) {
|
||||||
char codePoint = (char) money.codePointAt(i);
|
char codePoint = (char) money.codePointAt(i);
|
||||||
if (LEFT_TO_RIGHT_MARK.equals(codePoint)) {
|
if (LEFT_TO_RIGHT_MARK.equals(codePoint)) {
|
||||||
|
@ -61,8 +60,8 @@ public class Gê̄ldGetậl {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (geldDigit != null) {
|
if (geldDigit != null) {
|
||||||
HebrewDigitVowel vowel = HebrewDigitVowel.valueOfCharacter(codePoint);
|
Gê̄ldGetậlHebrewVowel vowel = Gê̄ldGetậlHebrewVowel.valueOfCharacter(codePoint);
|
||||||
if (!HebrewDigitVowel.NONE.equals(vowel)) {
|
if (!Gê̄ldGetậlHebrewVowel.NONE.equals(vowel)) {
|
||||||
geldDigit.setVowel(vowel);
|
geldDigit.setVowel(vowel);
|
||||||
result.add(geldDigit);
|
result.add(geldDigit);
|
||||||
geldDigit = null;
|
geldDigit = null;
|
||||||
|
@ -71,11 +70,11 @@ public class Gê̄ldGetậl {
|
||||||
result.add(geldDigit);
|
result.add(geldDigit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
HebrewDigitLetter letter = HebrewDigitLetter.valueOfCharacter(codePoint);
|
Gê̄ldGetậlHebrewLetter letter = Gê̄ldGetậlHebrewLetter.valueOfCharacter(codePoint);
|
||||||
if (HebrewDigitLetter.NONE.equals(letter)) {
|
if (Gê̄ldGetậlHebrewLetter.NONE.equals(letter)) {
|
||||||
throw new IllegalArgumentException("Unknown fraction codepoint: 0x"+Integer.toHexString(codePoint));
|
throw new IllegalArgumentException("Unknown fraction codepoint: 0x"+Integer.toHexString(codePoint));
|
||||||
}
|
}
|
||||||
geldDigit = new HebrewDigit(letter);
|
geldDigit = new Gê̄ldGetậlHebrew(letter);
|
||||||
}
|
}
|
||||||
if (geldDigit != null) {
|
if (geldDigit != null) {
|
||||||
result.add(geldDigit);
|
result.add(geldDigit);
|
||||||
|
@ -84,24 +83,24 @@ public class Gê̄ldGetậl {
|
||||||
if (result.isEmpty()) {
|
if (result.isEmpty()) {
|
||||||
throw new IllegalArgumentException("No hebrew money found");
|
throw new IllegalArgumentException("No hebrew money found");
|
||||||
}
|
}
|
||||||
HebrewDigit full = result.get(0);
|
Gê̄ldGetậlHebrew full = result.get(0);
|
||||||
HebrewDigit deelA = null;
|
Gê̄ldGetậlHebrew deelA = null;
|
||||||
HebrewDigit deelB = null;
|
Gê̄ldGetậlHebrew deelB = null;
|
||||||
HebrewDigit deelC = null;
|
Gê̄ldGetậlHebrew deelC = null;
|
||||||
if (result.size() > 1) {
|
if (result.size() > 1) {
|
||||||
deelA = result.get(1);
|
deelA = result.get(1);
|
||||||
} else {
|
} else {
|
||||||
deelA = new HebrewDigit();
|
deelA = new Gê̄ldGetậlHebrew();
|
||||||
}
|
}
|
||||||
if (result.size() > 2) {
|
if (result.size() > 2) {
|
||||||
deelB = result.get(2);
|
deelB = result.get(2);
|
||||||
} else {
|
} else {
|
||||||
deelB = new HebrewDigit();
|
deelB = new Gê̄ldGetậlHebrew();
|
||||||
}
|
}
|
||||||
if (result.size() > 3) {
|
if (result.size() > 3) {
|
||||||
deelC = result.get(3);
|
deelC = result.get(3);
|
||||||
} else {
|
} else {
|
||||||
deelC = new HebrewDigit();
|
deelC = new Gê̄ldGetậlHebrew();
|
||||||
}
|
}
|
||||||
this.nummerAlphabet = full;
|
this.nummerAlphabet = full;
|
||||||
this.nummerDeelA = deelA;
|
this.nummerDeelA = deelA;
|
||||||
|
@ -112,35 +111,35 @@ public class Gê̄ldGetậl {
|
||||||
|
|
||||||
private double calculateDecimalValue() {
|
private double calculateDecimalValue() {
|
||||||
boolean hasFourDigits =
|
boolean hasFourDigits =
|
||||||
!HebrewDigitLetter.NONE.equals(nummerDeelA.getLetter()) &&
|
!Gê̄ldGetậlHebrewLetter.NONE.equals(nummerDeelA.getLetter()) &&
|
||||||
!HebrewDigitLetter.NONE.equals(nummerDeelB.getLetter()) &&
|
!Gê̄ldGetậlHebrewLetter.NONE.equals(nummerDeelB.getLetter()) &&
|
||||||
!HebrewDigitLetter.NONE.equals(nummerDeelC.getLetter());
|
!Gê̄ldGetậlHebrewLetter.NONE.equals(nummerDeelC.getLetter());
|
||||||
double totalDecimalValue = nummerAlphabet.toDecimalValue(hasFourDigits);
|
double totalDecimalValue = nummerAlphabet.toDecimalValue(hasFourDigits);
|
||||||
if (!HebrewDigitLetter.NONE.equals(nummerDeelA.getLetter())) {
|
if (!Gê̄ldGetậlHebrewLetter.NONE.equals(nummerDeelA.getLetter())) {
|
||||||
totalDecimalValue += nummerDeelA.toDecimalValue(false);
|
totalDecimalValue += nummerDeelA.toDecimalValue(false);
|
||||||
}
|
}
|
||||||
if (!HebrewDigitLetter.NONE.equals(nummerDeelB.getLetter())) {
|
if (!Gê̄ldGetậlHebrewLetter.NONE.equals(nummerDeelB.getLetter())) {
|
||||||
totalDecimalValue += nummerDeelB.toDecimalValue(false);
|
totalDecimalValue += nummerDeelB.toDecimalValue(false);
|
||||||
}
|
}
|
||||||
if (!HebrewDigitLetter.NONE.equals(nummerDeelC.getLetter())) {
|
if (!Gê̄ldGetậlHebrewLetter.NONE.equals(nummerDeelC.getLetter())) {
|
||||||
totalDecimalValue += nummerDeelC.toDecimalValue(false);
|
totalDecimalValue += nummerDeelC.toDecimalValue(false);
|
||||||
}
|
}
|
||||||
return totalDecimalValue;
|
return totalDecimalValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HebrewDigit getNummerAlphabet() {
|
public Gê̄ldGetậlHebrew getNummerAlphabet() {
|
||||||
return nummerAlphabet;
|
return nummerAlphabet;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HebrewDigit getNummerDeelA() {
|
public Gê̄ldGetậlHebrew getNummerDeelA() {
|
||||||
return nummerDeelA;
|
return nummerDeelA;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HebrewDigit getNummerDeelB() {
|
public Gê̄ldGetậlHebrew getNummerDeelB() {
|
||||||
return nummerDeelB;
|
return nummerDeelB;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HebrewDigit getNummerDeelC() {
|
public Gê̄ldGetậlHebrew getNummerDeelC() {
|
||||||
return nummerDeelC;
|
return nummerDeelC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,10 +148,12 @@ public class Gê̄ldGetậl {
|
||||||
}
|
}
|
||||||
|
|
||||||
public V036Teger toTeger() {
|
public V036Teger toTeger() {
|
||||||
return new V036Teger(
|
V036Teger result = new V036Teger();
|
||||||
new V018Tord(nummerAlphabet.toTyte(), nummerDeelA.toTyte()),
|
result.setTytePart(T04PartQuad.PART_1, nummerAlphabet.toTyte());
|
||||||
new V018Tord(nummerDeelB.toTyte(), nummerDeelC.toTyte())
|
result.setTytePart(T04PartQuad.PART_2, nummerDeelA.toTyte());
|
||||||
);
|
result.setTytePart(T04PartQuad.PART_3, nummerDeelB.toTyte());
|
||||||
|
result.setTytePart(T04PartQuad.PART_4, nummerDeelC.toTyte());
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toHebrewString() {
|
public String toHebrewString() {
|
||||||
|
@ -163,24 +164,24 @@ public class Gê̄ldGetậl {
|
||||||
StringBuilder buf = new StringBuilder();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append(RIGHT_TO_LEFT_MARK);
|
buf.append(RIGHT_TO_LEFT_MARK);
|
||||||
buf.append(nummerAlphabet.getLetter().getCharacter());
|
buf.append(nummerAlphabet.getLetter().getCharacter());
|
||||||
if (!HebrewDigitVowel.NONE.equals(nummerAlphabet.getVowel())) {
|
if (!Gê̄ldGetậlHebrewVowel.NONE.equals(nummerAlphabet.getVowel())) {
|
||||||
buf.append(nummerAlphabet.getVowel().getCharacter());
|
buf.append(nummerAlphabet.getVowel().getCharacter());
|
||||||
}
|
}
|
||||||
if (!HebrewDigitLetter.NONE.equals(nummerDeelA.getLetter())) {
|
if (!Gê̄ldGetậlHebrewLetter.NONE.equals(nummerDeelA.getLetter())) {
|
||||||
buf.append(nummerDeelA.getLetter().getCharacter());
|
buf.append(nummerDeelA.getLetter().getCharacter());
|
||||||
if (!HebrewDigitVowel.NONE.equals(nummerDeelA.getVowel())) {
|
if (!Gê̄ldGetậlHebrewVowel.NONE.equals(nummerDeelA.getVowel())) {
|
||||||
buf.append(nummerDeelA.getVowel().getCharacter());
|
buf.append(nummerDeelA.getVowel().getCharacter());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!HebrewDigitLetter.NONE.equals(nummerDeelB.getLetter())) {
|
if (!Gê̄ldGetậlHebrewLetter.NONE.equals(nummerDeelB.getLetter())) {
|
||||||
buf.append(nummerDeelB.getLetter().getCharacter());
|
buf.append(nummerDeelB.getLetter().getCharacter());
|
||||||
if (!HebrewDigitVowel.NONE.equals(nummerDeelB.getVowel())) {
|
if (!Gê̄ldGetậlHebrewVowel.NONE.equals(nummerDeelB.getVowel())) {
|
||||||
buf.append(nummerDeelB.getVowel().getCharacter());
|
buf.append(nummerDeelB.getVowel().getCharacter());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!HebrewDigitLetter.NONE.equals(nummerDeelC.getLetter())) {
|
if (!Gê̄ldGetậlHebrewLetter.NONE.equals(nummerDeelC.getLetter())) {
|
||||||
buf.append(nummerDeelC.getLetter().getCharacter());
|
buf.append(nummerDeelC.getLetter().getCharacter());
|
||||||
if (!HebrewDigitVowel.NONE.equals(nummerDeelC.getVowel())) {
|
if (!Gê̄ldGetậlHebrewVowel.NONE.equals(nummerDeelC.getVowel())) {
|
||||||
buf.append(nummerDeelC.getVowel().getCharacter());
|
buf.append(nummerDeelC.getVowel().getCharacter());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,34 +9,34 @@ import love.distributedrebirth.demo4d.base2t.V009Tyte;
|
||||||
* @author willemtsade ©Δ∞ 仙上主天
|
* @author willemtsade ©Δ∞ 仙上主天
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class HebrewDigit {
|
public class Gê̄ldGetậlHebrew {
|
||||||
|
|
||||||
private static final double NUMERATOR_ONE = 1d;
|
private static final double NUMERATOR_ONE = 1d;
|
||||||
private static final int FRACTION_POWER = 10;
|
private static final int FRACTION_POWER = 10;
|
||||||
private HebrewDigitLetter letter;
|
private Gê̄ldGetậlHebrewLetter letter;
|
||||||
private HebrewDigitVowel vowel;
|
private Gê̄ldGetậlHebrewVowel vowel;
|
||||||
|
|
||||||
public HebrewDigit() {
|
public Gê̄ldGetậlHebrew() {
|
||||||
this.letter = HebrewDigitLetter.NONE;
|
this.letter = Gê̄ldGetậlHebrewLetter.NONE;
|
||||||
this.vowel = HebrewDigitVowel.NONE;
|
this.vowel = Gê̄ldGetậlHebrewVowel.NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HebrewDigit(HebrewDigitLetter letter) {
|
public Gê̄ldGetậlHebrew(Gê̄ldGetậlHebrewLetter letter) {
|
||||||
this.letter = letter;
|
this.letter = letter;
|
||||||
this.vowel = HebrewDigitVowel.NONE;
|
this.vowel = Gê̄ldGetậlHebrewVowel.NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HebrewDigit(V009Tyte tyte) {
|
public Gê̄ldGetậlHebrew(V009Tyte tyte) {
|
||||||
int value0 = tyte.getValue(T03PartTrit.PART_1).getValue().ordinalOf(T08PartOctal.PART_1);
|
int value0 = tyte.getValue(T03PartTrit.PART_1).getValue().ordinalOf(T08PartOctal.PART_1);
|
||||||
int value1 = tyte.getValue(T03PartTrit.PART_2).getValue().ordinalOf(T08PartOctal.PART_2);
|
int value1 = tyte.getValue(T03PartTrit.PART_2).getValue().ordinalOf(T08PartOctal.PART_2);
|
||||||
int value2 = tyte.getValue(T03PartTrit.PART_3).getValue().ordinalOf(T08PartOctal.PART_3);
|
int value2 = tyte.getValue(T03PartTrit.PART_3).getValue().ordinalOf(T08PartOctal.PART_3);
|
||||||
int combinedValue = value0 + value1 + value2;
|
int combinedValue = value0 + value1 + value2;
|
||||||
letter = HebrewDigitLetter.indexOf(combinedValue);
|
letter = Gê̄ldGetậlHebrewLetter.indexOf(combinedValue);
|
||||||
vowel = HebrewDigitVowel.indexOf(combinedValue >> HebrewDigitLetter.SHIFT_5);
|
vowel = Gê̄ldGetậlHebrewVowel.indexOf(combinedValue >> Gê̄ldGetậlHebrewLetter.SHIFT_5);
|
||||||
}
|
}
|
||||||
|
|
||||||
public V009Tyte toTyte() {
|
public V009Tyte toTyte() {
|
||||||
int combinedValue = letter.ordinal() + (vowel.ordinal() << HebrewDigitLetter.SHIFT_5);
|
int combinedValue = letter.ordinal() + (vowel.ordinal() << Gê̄ldGetậlHebrewLetter.SHIFT_5);
|
||||||
T08PartOctal value0 = T08PartOctal.indexOf(T08PartOctal.PART_1, combinedValue);
|
T08PartOctal value0 = T08PartOctal.indexOf(T08PartOctal.PART_1, combinedValue);
|
||||||
T08PartOctal value1 = T08PartOctal.indexOf(T08PartOctal.PART_2, combinedValue);
|
T08PartOctal value1 = T08PartOctal.indexOf(T08PartOctal.PART_2, combinedValue);
|
||||||
T08PartOctal value2 = T08PartOctal.indexOf(T08PartOctal.PART_3, combinedValue);
|
T08PartOctal value2 = T08PartOctal.indexOf(T08PartOctal.PART_3, combinedValue);
|
||||||
|
@ -48,26 +48,26 @@ public class HebrewDigit {
|
||||||
if (firstChar) {
|
if (firstChar) {
|
||||||
return fraction; // use full value
|
return fraction; // use full value
|
||||||
}
|
}
|
||||||
if (!HebrewDigitVowel.NONE.equals(vowel)) {
|
if (!Gê̄ldGetậlHebrewVowel.NONE.equals(vowel)) {
|
||||||
fraction = fraction * Math.pow(FRACTION_POWER, vowel.getFractionOffset());
|
fraction = fraction * Math.pow(FRACTION_POWER, vowel.getFractionOffset());
|
||||||
}
|
}
|
||||||
double result = NUMERATOR_ONE/fraction;
|
double result = NUMERATOR_ONE/fraction;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HebrewDigitLetter getLetter() {
|
public Gê̄ldGetậlHebrewLetter getLetter() {
|
||||||
return letter;
|
return letter;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLetter(HebrewDigitLetter letter) {
|
public void setLetter(Gê̄ldGetậlHebrewLetter letter) {
|
||||||
this.letter = letter;
|
this.letter = letter;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HebrewDigitVowel getVowel() {
|
public Gê̄ldGetậlHebrewVowel getVowel() {
|
||||||
return vowel;
|
return vowel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVowel(HebrewDigitVowel vowel) {
|
public void setVowel(Gê̄ldGetậlHebrewVowel vowel) {
|
||||||
this.vowel = vowel;
|
this.vowel = vowel;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -10,7 +10,7 @@ import java.util.stream.Collectors;
|
||||||
* @author willemtsade ©Δ∞ 仙上主天
|
* @author willemtsade ©Δ∞ 仙上主天
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public enum HebrewDigitLetter {
|
public enum Gê̄ldGetậlHebrewLetter {
|
||||||
// Unicode is horror in any language else than ascii;
|
// Unicode is horror in any language else than ascii;
|
||||||
// VS Alphabet order
|
// VS Alphabet order
|
||||||
// VS Unicode order
|
// VS Unicode order
|
||||||
|
@ -80,10 +80,10 @@ public enum HebrewDigitLetter {
|
||||||
private final int decimal;
|
private final int decimal;
|
||||||
private final char character;
|
private final char character;
|
||||||
|
|
||||||
private static final Map<Character, HebrewDigitLetter> CHAR_MAP = Collections.unmodifiableMap(
|
private static final Map<Character, Gê̄ldGetậlHebrewLetter> CHAR_MAP = Collections.unmodifiableMap(
|
||||||
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getCharacter(), v -> v)));
|
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getCharacter(), v -> v)));
|
||||||
|
|
||||||
private HebrewDigitLetter(int decimal, char character) {
|
private Gê̄ldGetậlHebrewLetter(int decimal, char character) {
|
||||||
this.decimal = decimal;
|
this.decimal = decimal;
|
||||||
this.character = character;
|
this.character = character;
|
||||||
}
|
}
|
||||||
|
@ -96,11 +96,11 @@ public enum HebrewDigitLetter {
|
||||||
return character;
|
return character;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HebrewDigitLetter indexOf(int index) {
|
public static Gê̄ldGetậlHebrewLetter indexOf(int index) {
|
||||||
return values()[index & BITMASK];
|
return values()[index & BITMASK];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HebrewDigitLetter valueOfCharacter(char codePoint) {
|
public static Gê̄ldGetậlHebrewLetter valueOfCharacter(char codePoint) {
|
||||||
return CHAR_MAP.getOrDefault(codePoint, HebrewDigitLetter.NONE);
|
return CHAR_MAP.getOrDefault(codePoint, Gê̄ldGetậlHebrewLetter.NONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -10,7 +10,7 @@ import java.util.stream.Collectors;
|
||||||
* @author willemtsade ©Δ∞ 仙上主天
|
* @author willemtsade ©Δ∞ 仙上主天
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public enum HebrewDigitVowel {
|
public enum Gê̄ldGetậlHebrewVowel {
|
||||||
NONE (0, (char) 0x0000),
|
NONE (0, (char) 0x0000),
|
||||||
VOWEL_1 (1, (char) 0x05B4),
|
VOWEL_1 (1, (char) 0x05B4),
|
||||||
VOWEL_2 (2, (char) 0x05B5),
|
VOWEL_2 (2, (char) 0x05B5),
|
||||||
|
@ -33,10 +33,10 @@ public enum HebrewDigitVowel {
|
||||||
private final int fractionOffset;
|
private final int fractionOffset;
|
||||||
private final char character;
|
private final char character;
|
||||||
|
|
||||||
private static final Map<Character, HebrewDigitVowel> CHAR_MAP = Collections.unmodifiableMap(
|
private static final Map<Character, Gê̄ldGetậlHebrewVowel> CHAR_MAP = Collections.unmodifiableMap(
|
||||||
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getCharacter(), v -> v)));
|
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getCharacter(), v -> v)));
|
||||||
|
|
||||||
private HebrewDigitVowel(int fractionOffset, char character) {
|
private Gê̄ldGetậlHebrewVowel(int fractionOffset, char character) {
|
||||||
this.fractionOffset = fractionOffset;
|
this.fractionOffset = fractionOffset;
|
||||||
this.character = character;
|
this.character = character;
|
||||||
}
|
}
|
||||||
|
@ -49,11 +49,11 @@ public enum HebrewDigitVowel {
|
||||||
return character;
|
return character;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HebrewDigitVowel indexOf(int index) {
|
public static Gê̄ldGetậlHebrewVowel indexOf(int index) {
|
||||||
return values()[index & BITMASK];
|
return values()[index & BITMASK];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HebrewDigitVowel valueOfCharacter(char codePoint) {
|
public static Gê̄ldGetậlHebrewVowel valueOfCharacter(char codePoint) {
|
||||||
return CHAR_MAP.getOrDefault(codePoint, HebrewDigitVowel.NONE);
|
return CHAR_MAP.getOrDefault(codePoint, Gê̄ldGetậlHebrewVowel.NONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue