POC alu code
This commit is contained in:
parent
5a0b3978d1
commit
bde611e456
|
@ -1,6 +1,7 @@
|
|||
package love.distributedrebirth.numberxd;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal;
|
||||
import love.distributedrebirth.numberxd.base2t.BaseNumber;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
|
@ -8,5 +9,7 @@ public interface BaseGetậl<T extends BaseGetậl<T,V>,V extends BaseNumber<V>>
|
|||
|
||||
V getValue();
|
||||
|
||||
T toClone();
|
||||
T toClone(BaseIteratorOctal values);
|
||||
|
||||
BaseIteratorOctal iteratorOctalsByClone();
|
||||
}
|
||||
|
|
|
@ -47,7 +47,12 @@ public class GroßGetậl1ⁿᴰ extends AbstractBaseGetậlMatrix1<GroßGetậl
|
|||
}
|
||||
|
||||
@Override
|
||||
public GroßGetậl1ⁿᴰ toClone() {
|
||||
return new GroßGetậl1ⁿᴰ(value.toClone());
|
||||
public GroßGetậl1ⁿᴰ toClone(BaseIteratorOctal values) {
|
||||
return new GroßGetậl1ⁿᴰ(values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseIteratorOctal iteratorOctalsByClone() {
|
||||
return value.iteratorOctalsByClone();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,11 +43,16 @@ public class GroßGetậl6ˢᴰ extends AbstractBaseGetậlMatrix2<GroßGetậl6
|
|||
}
|
||||
|
||||
@Override
|
||||
public GroßGetậl6ˢᴰ toClone() {
|
||||
public GroßGetậl6ˢᴰ toClone(BaseIteratorOctal values) {
|
||||
return new GroßGetậl6ˢᴰ(values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseIteratorOctal iteratorOctalsByClone() {
|
||||
BaseIteratorOctalStack cloneStack = new BaseIteratorOctalStack();
|
||||
for (int i=0;i<this.values.length;i++) {
|
||||
cloneStack.addIterator(this.values[i].iteratorOctalsByClone());
|
||||
}
|
||||
return new GroßGetậl6ˢᴰ(cloneStack);
|
||||
return cloneStack;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,12 @@ public class GroßGetậlŌṁDiamond1ⁿᴰ extends AbstractGroßGetậlŌṁ1
|
|||
}
|
||||
|
||||
@Override
|
||||
public GroßGetậlŌṁDiamond1ⁿᴰ toClone() {
|
||||
public GroßGetậlŌṁDiamond1ⁿᴰ toClone(BaseIteratorOctal values) {
|
||||
return new GroßGetậlŌṁDiamond1ⁿᴰ(getFractalLevel(), values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseIteratorOctal iteratorOctalsByClone() {
|
||||
BaseIteratorOctalStack cloneStack = new BaseIteratorOctalStack();
|
||||
for (int x=0;x<getMatrix1Length();x++) {
|
||||
setMatrix1(x);
|
||||
|
@ -40,6 +45,6 @@ public class GroßGetậlŌṁDiamond1ⁿᴰ extends AbstractGroßGetậlŌṁ1
|
|||
cloneStack.addIterator(getValue().iteratorOctalsByClone());
|
||||
}
|
||||
}
|
||||
return new GroßGetậlŌṁDiamond1ⁿᴰ(getFractalLevel(), cloneStack);
|
||||
return cloneStack;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,12 @@ public class GroßGetậlŌṁDiamond6ˢᴰ extends AbstractGroßGetậlŌṁ6ˢ
|
|||
}
|
||||
|
||||
@Override
|
||||
public GroßGetậlŌṁDiamond6ˢᴰ toClone() {
|
||||
public GroßGetậlŌṁDiamond6ˢᴰ toClone(BaseIteratorOctal values) {
|
||||
return new GroßGetậlŌṁDiamond6ˢᴰ(getFractalLevel(), values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseIteratorOctal iteratorOctalsByClone() {
|
||||
BaseIteratorOctalStack cloneStack = new BaseIteratorOctalStack();
|
||||
for (int x=0;x<getMatrix1Length();x++) {
|
||||
setMatrix1(x);
|
||||
|
@ -39,6 +44,6 @@ public class GroßGetậlŌṁDiamond6ˢᴰ extends AbstractGroßGetậlŌṁ6ˢ
|
|||
}
|
||||
}
|
||||
}
|
||||
return new GroßGetậlŌṁDiamond6ˢᴰ(getFractalLevel(), cloneStack);
|
||||
return cloneStack;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,12 @@ public class GroßGetậlŌṁHyperStàr1ⁿᴰ extends AbstractGroßGetậlŌ
|
|||
}
|
||||
|
||||
@Override
|
||||
public GroßGetậlŌṁHyperStàr1ⁿᴰ toClone() {
|
||||
public GroßGetậlŌṁHyperStàr1ⁿᴰ toClone(BaseIteratorOctal values) {
|
||||
return new GroßGetậlŌṁHyperStàr1ⁿᴰ(getFractalLevel(), values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseIteratorOctal iteratorOctalsByClone() {
|
||||
BaseIteratorOctalStack cloneStack = new BaseIteratorOctalStack();
|
||||
for (int x=0;x<getMatrix1Length();x++) {
|
||||
setMatrix1(x);
|
||||
|
@ -35,6 +40,6 @@ public class GroßGetậlŌṁHyperStàr1ⁿᴰ extends AbstractGroßGetậlŌ
|
|||
cloneStack.addIterator(getValue().iteratorOctalsByClone());
|
||||
}
|
||||
}
|
||||
return new GroßGetậlŌṁHyperStàr1ⁿᴰ(getFractalLevel(), cloneStack);
|
||||
return cloneStack;
|
||||
}
|
||||
}
|
|
@ -24,9 +24,14 @@ public class GroßGetậlŌṁHyperStàr6ˢᴰ extends AbstractGroßGetậlŌṁ
|
|||
// TODO
|
||||
return level;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public GroßGetậlŌṁHyperStàr6ˢᴰ toClone() {
|
||||
public GroßGetậlŌṁHyperStàr6ˢᴰ toClone(BaseIteratorOctal values) {
|
||||
return new GroßGetậlŌṁHyperStàr6ˢᴰ(getFractalLevel(), values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseIteratorOctal iteratorOctalsByClone() {
|
||||
BaseIteratorOctalStack cloneStack = new BaseIteratorOctalStack();
|
||||
for (int x=0;x<getMatrix1Length();x++) {
|
||||
setMatrix1(x);
|
||||
|
@ -38,6 +43,6 @@ public class GroßGetậlŌṁHyperStàr6ˢᴰ extends AbstractGroßGetậlŌṁ
|
|||
}
|
||||
}
|
||||
}
|
||||
return new GroßGetậlŌṁHyperStàr6ˢᴰ(getFractalLevel(), cloneStack);
|
||||
return cloneStack;
|
||||
}
|
||||
}
|
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal;
|
||||
import love.distributedrebirth.numberxd.base2t.part.T04PartQuad;
|
||||
import love.distributedrebirth.numberxd.base2t.type.V009Tyte;
|
||||
import love.distributedrebirth.numberxd.base2t.type.V036Teger;
|
||||
|
@ -16,6 +17,10 @@ public class Gê̄ldGetậl extends AbstractBaseGetậlMatrix1<Gê̄ldGetậl,V0
|
|||
private static final Character LEFT_TO_RIGHT_MARK = 0x200E;
|
||||
private static final Character RIGHT_TO_LEFT_MARK = 0x200F;
|
||||
|
||||
public Gê̄ldGetậl(BaseIteratorOctal values) {
|
||||
this (new V036Teger(values));
|
||||
}
|
||||
|
||||
public Gê̄ldGetậl(V036Teger value) {
|
||||
this.value = value;
|
||||
this.totalDecimalValue = calculateDecimalValue();
|
||||
|
@ -169,7 +174,12 @@ public class Gê̄ldGetậl extends AbstractBaseGetậlMatrix1<Gê̄ldGetậl,V0
|
|||
}
|
||||
|
||||
@Override
|
||||
public Gê̄ldGetậl toClone() {
|
||||
return new Gê̄ldGetậl(value.toClone());
|
||||
public Gê̄ldGetậl toClone(BaseIteratorOctal values) {
|
||||
return new Gê̄ldGetậl(values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseIteratorOctal iteratorOctalsByClone() {
|
||||
return value.iteratorOctalsByClone();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,11 +34,16 @@ public class KlompGetậl4ˢᴰ extends AbstractBaseGetậlMatrix1<KlompGetậl4
|
|||
}
|
||||
|
||||
@Override
|
||||
public KlompGetậl4ˢᴰ toClone() {
|
||||
public KlompGetậl4ˢᴰ toClone(BaseIteratorOctal values) {
|
||||
return new KlompGetậl4ˢᴰ(values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseIteratorOctal iteratorOctalsByClone() {
|
||||
BaseIteratorOctalStack cloneStack = new BaseIteratorOctalStack();
|
||||
for (int i=0;i<this.values.length;i++) {
|
||||
cloneStack.addIterator(this.values[i].iteratorOctalsByClone());
|
||||
}
|
||||
return new KlompGetậl4ˢᴰ(cloneStack);
|
||||
return cloneStack;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,9 +59,14 @@ public class KlompÅtŌṁKāassGetậl4ˢᴰ extends AbstractBaseGetậlMatrix2
|
|||
public int getMatrix2Length() {
|
||||
return kaasCuts;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public KlompÅtŌṁKāassGetậl4ˢᴰ toClone() {
|
||||
public KlompÅtŌṁKāassGetậl4ˢᴰ toClone(BaseIteratorOctal values) {
|
||||
return new KlompÅtŌṁKāassGetậl4ˢᴰ(getKaasCuts(), values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseIteratorOctal iteratorOctalsByClone() {
|
||||
BaseIteratorOctalStack cloneStack = new BaseIteratorOctalStack();
|
||||
for (int x=0;x<getMatrix1Length();x++) {
|
||||
setMatrix1(x);
|
||||
|
@ -70,6 +75,6 @@ public class KlompÅtŌṁKāassGetậl4ˢᴰ extends AbstractBaseGetậlMatrix2
|
|||
cloneStack.addIterator(getValue().iteratorOctalsByClone());
|
||||
}
|
||||
}
|
||||
return new KlompÅtŌṁKāassGetậl4ˢᴰ(getKaasCuts(), cloneStack);
|
||||
return cloneStack;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,11 +37,16 @@ public class WaveGetậl1ᑫᴰ extends AbstractBaseGetậlMatrix1<WaveGetậl1
|
|||
}
|
||||
|
||||
@Override
|
||||
public WaveGetậl1ᑫᴰ toClone() {
|
||||
public WaveGetậl1ᑫᴰ toClone(BaseIteratorOctal values) {
|
||||
return new WaveGetậl1ᑫᴰ(values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseIteratorOctal iteratorOctalsByClone() {
|
||||
BaseIteratorOctalStack cloneStack = new BaseIteratorOctalStack();
|
||||
for (int i=0;i<this.values.length;i++) {
|
||||
cloneStack.addIterator(this.values[i].iteratorOctalsByClone());
|
||||
}
|
||||
return new WaveGetậl1ᑫᴰ(cloneStack);
|
||||
return cloneStack;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,12 @@ public class WaveGetậl1ⁿᴰ implements BaseGetậl<WaveGetậl1ⁿᴰ, V0x04
|
|||
}
|
||||
|
||||
@Override
|
||||
public WaveGetậl1ⁿᴰ toClone() {
|
||||
return new WaveGetậl1ⁿᴰ(getValue().iteratorOctalsByClone());
|
||||
public WaveGetậl1ⁿᴰ toClone(BaseIteratorOctal values) {
|
||||
return new WaveGetậl1ⁿᴰ(values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseIteratorOctal iteratorOctalsByClone() {
|
||||
return value.iteratorOctalsByClone();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,54 @@
|
|||
package love.distributedrebirth.numberxd.alu;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.numberxd.BaseGetậl;
|
||||
import love.distributedrebirth.numberxd.base2t.BaseIteratorOctal;
|
||||
import love.distributedrebirth.numberxd.base2t.BaseNumber;
|
||||
import love.distributedrebirth.numberxd.base2t.part.T08PartOctal;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class ŌctopǔsALU {
|
||||
|
||||
public <T extends BaseGetậl<T,V>,V extends BaseNumber<V>> BaseGetậl<T,V> math(BaseGetậl<T,V> opA, BaseGetậl<T,V> opB) {
|
||||
BaseIteratorOctal bioA = opA.iteratorOctalsByClone();
|
||||
BaseIteratorOctal bioB = opB.iteratorOctalsByClone();
|
||||
BaseIteratorOctalALU bioALU = new BaseIteratorOctalALU(bioA, bioB);
|
||||
BaseGetậl<T,V> result = opA.toClone(bioALU);
|
||||
return result;
|
||||
}
|
||||
|
||||
class BaseIteratorOctalALU implements BaseIteratorOctal {
|
||||
|
||||
private final BaseIteratorOctal bioA;
|
||||
private final BaseIteratorOctal bioB;
|
||||
|
||||
public BaseIteratorOctalALU(BaseIteratorOctal bioA, BaseIteratorOctal bioB) {
|
||||
this.bioA = bioA;
|
||||
this.bioB = bioB;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return bioA.hasNext();
|
||||
}
|
||||
|
||||
@Override
|
||||
public T08PartOctal next() {
|
||||
T08PartOctal valA = bioA.next();
|
||||
T08PartOctal valB = bioB.next();
|
||||
|
||||
int valANum = valA.BȍőnRangTelNul();
|
||||
int valBNum = valB.BȍőnRangTelNul();
|
||||
|
||||
var valResultNum = valANum + valBNum;
|
||||
|
||||
if (valResultNum > valA.BãßInstances().length) {
|
||||
valResultNum = valA.BãßInstances().length -1;
|
||||
}
|
||||
|
||||
T08PartOctal valResult = T08PartOctal.values()[valResultNum];
|
||||
|
||||
return valResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue