本文整理了Java中org.neo4j.graphdb.Direction.ordinal()
方法的一些代码示例,展示了Direction.ordinal()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Direction.ordinal()
方法的具体详情如下:
包路径:org.neo4j.graphdb.Direction
类名称:Direction
方法名:ordinal
暂无
代码示例来源:origin: neo4j/neo4j
private int idOffset( Direction direction )
{
return BASE_IDS_OFFSET + (direction.ordinal() * ID_AND_COUNT_SIZE);
}
代码示例来源:origin: neo4j/neo4j
int index = direction.ordinal();
if ( pathsHere == null )
代码示例来源:origin: neo4j/neo4j
expectedCounts.get( spec.type )[spec.dir.ordinal()]++;
if ( counts[direction.ordinal()] > 0 )
counts[direction.ordinal()]--;
assertCounts( me, expectedCounts );
if ( counter % 3 == 0 && counter > 0 )
expectedCounts.get( spec.type )[spec.dir.ordinal()]--;
assertCounts( me, expectedCounts );
if ( counter % 3 == 0 && counter > 0 )
代码示例来源:origin: neo4j-contrib/neo4j-apoc-procedures
int from=0;int to=0;
int[][] result = new int[2][pairs.size()];
int outIdx = Direction.OUTGOING.ordinal();
int inIdx = Direction.INCOMING.ordinal();
for (Pair<RelationshipType, Direction> pair : pairs) {
int type = ops.relationshipType(pair.first().name());
代码示例来源:origin: stackoverflow.com
enum Direction{
NONE, FORWARD, RIGHT, LEFT;
}
Direction dir = Direction.FORWARD;
byte enc = (byte) dir.ordinal();
代码示例来源:origin: org.neo4j/neo4j-kernel
private int idOffset( Direction direction )
{
return BASE_IDS_OFFSET + (direction.ordinal() * ID_AND_COUNT_SIZE);
}
代码示例来源:origin: stackoverflow.com
public Direction turn(Direction initial, int turns)
{
Direction[] dirs = Direction.values();
return dirs[(initial.ordinal()+turns) % dirs.length];
}
代码示例来源:origin: stackoverflow.com
public void setNeighbor(MazeCell c, Direction d)
{
checked[d.ordinal()] = true;
if (!c.isInMaze() && !c.hasNeighbor(oppositeOf(d)))
{
if (setNeighbor)
{
setNeighbor = false;
c.setNeighbor(this, oppositeOf(d));
}
neighbors[d.ordinal()] = c;
{
setNeighbor = true;
inMaze = true;
}
代码示例来源:origin: stackoverflow.com
public class TestDirection {
public static void main(String[] args) {
System.out.printf("%10s: %-4s%n", "Direction", "Ordinal");
for (Direction dir : Direction.values()) {
System.out.printf("%10s: %-4d%n", dir.getText(), dir.ordinal());
}
}
}
代码示例来源:origin: stackoverflow.com
public PathTile[] getAdjacent(Position p) {
PathTile[] nodes = new PathTile[8];
int x = p.getX();
int y = p.getY();
PathTile old = null;
if (holdingList.size() > 0) old = holdingList.get(holdingList.size() - 1);
for(Direction d: Direction.values()){
newNode = new Position(x+ d.x, y + d.y, p.getZ()); //top centre
if (!open.contains(newNode)) open.add(newNode);
h = OctileValue(newNode);
g = d.cost;
nodes[d.ordinal()] = new PathTile(newNode, g, h, old);
}
return nodes;
}
代码示例来源:origin: org.neo4j/neo4j-graphdb-api
int index = direction.ordinal();
if ( pathsHere == null )
内容来源于网络,如有侵权,请联系作者删除!