Package cern.colt.list

Examples of cern.colt.list.AbstractLongList


            }
        });
    }

    public VertexList vertexIds() {
        AbstractLongList list = new LongArrayList();
        for (Long id : Iterables.transform(this,new Function<Entry, Long>() {
            @Nullable
            @Override
            public Long apply(@Nullable Entry entry) {
                return edgeSerializer.readRelation(vertex.getID(),entry,true,tx).getOtherVertexId();
            }
        })) {
            list.add(id);
        }
        return new VertexLongList(tx,list);
    }
View Full Code Here


    public Iterator<TitanVertex> iterator() {
        return Iterators.unmodifiableIterator(vertices.iterator());
    }

    private static final AbstractLongList toLongList(List<TitanVertex> vertices) {
        AbstractLongList result = new LongArrayList(vertices.size());
        for (TitanVertex n : vertices) {
            result.add(n.getID());
        }
        return result;
    }
View Full Code Here

        return vertices.size();
    }

    @Override
    public void addAll(VertexList vertexlist) {
        AbstractLongList othervertexids = null;
        if (vertexlist instanceof VertexLongList) {
            othervertexids = ((VertexLongList) vertexlist).vertices;
        } else if (vertexlist instanceof VertexArrayList) {
            VertexArrayList other = (VertexArrayList) vertexlist;
            othervertexids = new LongArrayList(other.size());
            for (int i = 0; i < other.size(); i++) othervertexids.add(other.getID(i));
        } else {
            throw new IllegalArgumentException("Unsupported vertex-list: " + vertexlist.getClass());
        }
        sorted = false;
        vertices.addAllOfFromTo(othervertexids, 0, othervertexids.size() - 1);
    }
View Full Code Here

TOP

Related Classes of cern.colt.list.AbstractLongList

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.