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

convex.etch.EtchUtils Maven / Gradle / Ivy

The newest version!
package convex.etch;

import java.io.IOException;

import convex.core.data.ACell;
import convex.core.data.Hash;
import convex.core.util.Utils;

public class EtchUtils {
	
	public static FullValidator getFullValidator() {
		return new FullValidator();
	}

	/**
	 * An Etch validator that checks every index entry
	 */
	public static class FullValidator implements IEtchIndexVisitor {
		public long visited=0;
		public long entries=0;
		public long empty=0;
		public long values=0;
		public long indexPtrs=0;
		@Override
		public void visit(Etch e, int level, int[] digits, long indexPointer) throws IOException {
			visited++;
			
			int isize=e.indexSize(level);
			
			String ps="";
			for (int ll=0; ll




© 2015 - 2024 Weber Informatics LLC | Privacy Policy