All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.DNAProject.core.governance.SplitCurve Maven / Gradle / Ivy

The newest version!
package com.github.DNAProject.core.governance;

import com.github.DNAProject.common.Helper;
import com.github.DNAProject.io.BinaryReader;
import com.github.DNAProject.io.BinaryWriter;
import com.github.DNAProject.io.Serializable;

import java.io.IOException;
import java.math.BigInteger;

public class SplitCurve implements Serializable {
    public int[] Yi;
    public SplitCurve(){}
    public SplitCurve(int[] Yi){
        this.Yi = Yi;
    }

    @Override
    public void deserialize(BinaryReader reader) throws IOException {
        byte[] nBytes = reader.readVarBytes();
        BigInteger b = Helper.BigIntFromNeoBytes(nBytes);
        int n = b.intValue();
        this.Yi = new int[n];
        for(int i=0; i




© 2015 - 2025 Weber Informatics LLC | Privacy Policy