Package it.unimi.dsi.fastutil.longs

Examples of it.unimi.dsi.fastutil.longs.LongArrayList


  public void addPartitionMessages(
    int partitionId, VertexIdMessages<I, M> messages) throws IOException {
    VertexIdMessageIterator<I, M> vertexIdMessageIterator =
        messages.getVertexIdMessageIterator();
    long pointer = 0;
    LongArrayList list;
    while (vertexIdMessageIterator.hasNext()) {
      vertexIdMessageIterator.next();
      M msg = vertexIdMessageIterator.getCurrentMessage();
      list = getOrCreateList(vertexIdMessageIterator);
      if (vertexIdMessageIterator.isNewMessage()) {
        IndexAndDataOut indexAndDataOut = bytesBuffer.getIndexAndDataOut();
        pointer = indexAndDataOut.getIndex();
        pointer <<= 32;
        ExtendedDataOutput dataOutput = indexAndDataOut.getDataOutput();
        pointer += dataOutput.getPos();
        msg.write(dataOutput);
      }
      synchronized (list) {
        list.add(pointer);
      }
    }
  }
View Full Code Here


    EdgeIterables.initialize(this, edges);
  }

  @Override
  public void initialize(int capacity) {
    neighbors = new LongArrayList(capacity);
    edgeValues = new DoubleArrayList(capacity);
  }
View Full Code Here

    edgeValues = new DoubleArrayList(capacity);
  }

  @Override
  public void initialize() {
    neighbors = new LongArrayList();
    edgeValues = new DoubleArrayList();
  }
View Full Code Here

    /**
     * Constructor
     * @param capacity Capacity
     */
    public BasicLongArrayList(int capacity) {
      list = new LongArrayList(capacity);
    }
View Full Code Here

    EdgeIterables.initialize(this, edges);
  }

  @Override
  public void initialize(int capacity) {
    neighbors = new LongArrayList(capacity);
  }
View Full Code Here

    neighbors = new LongArrayList(capacity);
  }

  @Override
  public void initialize() {
    neighbors = new LongArrayList();
  }
View Full Code Here

    return true;
  }

  @Override
  protected LongArrayList createList() {
    return new LongArrayList();
  }
View Full Code Here

  public void addPartitionMessages(int partitionId,
    VertexIdMessages<LongWritable, M> messages) throws IOException {
    VertexIdMessageIterator<LongWritable, M> iterator =
        messages.getVertexIdMessageIterator();
    long pointer = 0;
    LongArrayList list;
    while (iterator.hasNext()) {
      iterator.next();
      M msg = iterator.getCurrentMessage();
      list = getList(iterator);
      if (iterator.isNewMessage()) {
        IndexAndDataOut indexAndDataOut = bytesBuffer.getIndexAndDataOut();
        pointer = indexAndDataOut.getIndex();
        pointer <<= 32;
        ExtendedDataOutput dataOutput = indexAndDataOut.getDataOutput();
        pointer += dataOutput.getPos();
        msg.write(dataOutput);
      }
      synchronized (list) { // TODO - any better way?
        list.add(pointer);
      }
    }
  }
View Full Code Here

  }

  @Override
  public Iterable<M> getVertexMessages(
    LongWritable vertexId) throws IOException {
    LongArrayList list = getPartitionMap(vertexId).get(
        vertexId.get());
    if (list == null) {
      return EmptyIterable.get();
    } else {
      return new PointerListMessagesIterable<>(messageValueFactory,
View Full Code Here

        // crate hash strategy with a single channel blocks -- make sure there is some overlap in values
        List<RandomAccessBlock> channel = ImmutableList.of(
                BlockAssertions.createStringSequenceBlock(10, 20).toRandomAccessBlock(),
                BlockAssertions.createStringSequenceBlock(20, 30).toRandomAccessBlock(),
                BlockAssertions.createStringSequenceBlock(15, 25).toRandomAccessBlock());
        LongArrayList addresses = new LongArrayList();
        for (int blockIndex = 0; blockIndex < channel.size(); blockIndex++) {
            RandomAccessBlock block = channel.get(blockIndex);
            for (int positionIndex = 0; positionIndex < block.getPositionCount(); positionIndex++) {
                addresses.add(encodeSyntheticAddress(blockIndex, positionIndex));
            }
        }
        LookupSource lookupSource = lookupSourceFactoryFactory.createLookupSource(addresses, ImmutableList.of(channel), operatorContext);

        JoinProbeCompiler joinProbeCompiler = new JoinProbeCompiler();
View Full Code Here

TOP

Related Classes of it.unimi.dsi.fastutil.longs.LongArrayList

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.