Package it.unimi.dsi.util

Examples of it.unimi.dsi.util.ShiftAddXorSignedStringMap


      }
      collection = new FileLinesCollection( termFile, "UTF-8" );
    }
    LOGGER.debug( "Building function..." );
    final int width = jsapResult.getInt( "width" );
    if ( jsapResult.getBoolean( "sorted" ) ) BinIO.storeObject( new URLMPHVirtualDocumentResolver( new ShiftAddXorSignedStringMap( collection.iterator(), new TwoStepsLcpMonotoneMinimalPerfectHashFunction<CharSequence>( collection, iso ? TransformationStrategies.prefixFreeIso() : TransformationStrategies.prefixFreeUtf16() ), width ) ), resolverName );
    else BinIO.storeObject( new URLMPHVirtualDocumentResolver( new ShiftAddXorSignedStringMap( collection.iterator(), new MWHCFunction<CharSequence>( collection, iso ? TransformationStrategies.iso() : TransformationStrategies.utf16() ), width ) ), resolverName );
    LOGGER.debug( " done." );
    }
View Full Code Here


    Util.ensureLog4JIsConfigured( Level.INFO );
  }

  private static StringMap<? extends CharSequence> createMap( String basename ) throws IOException {
    FileLinesCollection flc = new FileLinesCollection( basename, "UTF-8" );
    return new ShiftAddXorSignedStringMap( flc.iterator(), new MWHCFunction<CharSequence>( flc, TransformationStrategies.utf16() ) );
  }
View Full Code Here

        new IndexBuilder( basename, new StringArrayDocumentCollection( "A B", "B", "A", "A" ) ).run();
    BinIO.storeObject( DocumentalStrategies.uniform( 2, 4 ), basename + "-strategy" );
    new PartitionDocumentally( basename + "-text", basename + "-cluster", DocumentalStrategies.uniform( 2, 4 ), basename + "-strategy", 0, 1024, CompressionFlags.DEFAULT_STANDARD_INDEX, true, false, 0, 0, 0, ProgressLogger.DEFAULT_LOG_INTERVAL ).run();
    FileLinesCollection flc;
    flc = new FileLinesCollection( basename + "-cluster-0.terms", "ASCII" );
    BinIO.storeObject( new ShiftAddXorSignedStringMap( flc.iterator(), new MWHCFunction<CharSequence>( flc , TransformationStrategies.utf16() ) ), basename + "-cluster-0.termmap" )
    flc = new FileLinesCollection( basename + "-cluster-1.terms", "ASCII" );
    BinIO.storeObject( new ShiftAddXorSignedStringMap( flc.iterator(), new MWHCFunction<CharSequence>( flc , TransformationStrategies.utf16() ) ), basename + "-cluster-1.termmap" )
    Index index = Index.getInstance( basename + "-cluster" );
    assertEquals( Integer.MAX_VALUE, index.documents( "b" ).skipTo( 2 ) );
  }
View Full Code Here

      bytes = bytesOut.toByteArray();
      termsOut.writeInt(bytes.length);
      termsOut.write(bytes);

      ShiftAddXorSignedStringMap dict = new ShiftAddXorSignedStringMap(termList.iterator(),
          new TwoStepsLcpMonotoneMinimalPerfectHashFunction<CharSequence>(termList,
              new DictionaryTransformationStrategy(true)));

      bytesOut = new ByteArrayOutputStream();
      objOut = new ObjectOutputStream(bytesOut);
View Full Code Here

    bytes = bytesOut.toByteArray();
    os.writeInt(bytes.length);
    os.write(bytes);

    // Serialize the hash function
    ShiftAddXorSignedStringMap dict = new ShiftAddXorSignedStringMap(stringList.iterator(),
        new TwoStepsLcpMonotoneMinimalPerfectHashFunction<CharSequence>(stringList,
            TransformationStrategies.prefixFreeUtf16()));

    bytesOut = new ByteArrayOutputStream();
    objOut = new ObjectOutputStream(bytesOut);
View Full Code Here

      bytes = bytesOut.toByteArray();
      termsOut.writeInt(bytes.length);
      termsOut.write(bytes);

      ShiftAddXorSignedStringMap dict = new ShiftAddXorSignedStringMap(termList.iterator(),
          new TwoStepsLcpMonotoneMinimalPerfectHashFunction<CharSequence>(termList,
              new DictionaryTransformationStrategy(true)));

      bytesOut = new ByteArrayOutputStream();
      objOut = new ObjectOutputStream(bytesOut);
View Full Code Here

      bytes = bytesOut.toByteArray();
      termsOut.writeInt(bytes.length);
      termsOut.write(bytes);

      ShiftAddXorSignedStringMap dict = new ShiftAddXorSignedStringMap(termList.iterator(),
          new TwoStepsLcpMonotoneMinimalPerfectHashFunction<CharSequence>(termList,
              DictionaryTransformationStrategy.getStrategy()));

      bytesOut = new ByteArrayOutputStream();
      objOut = new ObjectOutputStream(bytesOut);
View Full Code Here

      bytes = bytesOut.toByteArray();
      termsOut.writeInt(bytes.length);
      termsOut.write(bytes);

      ShiftAddXorSignedStringMap dict = new ShiftAddXorSignedStringMap(termList.iterator(),
          new TwoStepsLcpMonotoneMinimalPerfectHashFunction<CharSequence>(termList,
              new DictionaryTransformationStrategy(true)));

      bytesOut = new ByteArrayOutputStream();
      objOut = new ObjectOutputStream(bytesOut);
View Full Code Here

      bytes = bytesOut.toByteArray();
      termsOut.writeInt(bytes.length);
      termsOut.write(bytes);

      ShiftAddXorSignedStringMap dict = new ShiftAddXorSignedStringMap(termList.iterator(),
          new TwoStepsLcpMonotoneMinimalPerfectHashFunction<CharSequence>(termList,
              new DictionaryTransformationStrategy(true)));

      bytesOut = new ByteArrayOutputStream();
      objOut = new ObjectOutputStream(bytesOut);
View Full Code Here

TOP

Related Classes of it.unimi.dsi.util.ShiftAddXorSignedStringMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.