Get the start moment of the movements that leave
from a given node

@param n the source node
@return a list of start moment. May be empty
975784
public List<IntVar> getOutgoing(Node n) {
        List<IntVar> l = outgoings.get(n);
        if (l == null) {
            l = Collections.emptyList();
        }
        return l;

    }
68146
private List<Set<Integer>> createInitialAggregates(
                List<Set<Integer>> N, boolean[] R) {
            C = new ArrayList<Set<Integer>>();

            for (int i = 0; i < R.length; ++i) {

                // Skip non-free nodes
                if (!R[i])
                    continue;

                // See if all nodes in the current N-set are free
                boolean free = true;
                for (int j : N.get(i))
                    free &= R[j];

                // Create an aggregate out of N[i]
                if (free) {
                    C.add(new HashSet<Integer>(N.get(i)));
                    for (int j : N.get(i))
                        R[j] = false;
                }

            }

            return C;
        }
1335360
public List<int[]> getNPaths(int n)
    {
        List<int[]> result = new ArrayList<int[]>();

        n = Math.min(Predefine.MAX_SEGMENT_NUM, n);
        for (int i = 0; i < N && result.size() < n; ++i)
        {
            List<int[]> pathList = getPaths(i);
            for (int[] path : pathList)
            {
                if (result.size() == n) break;
                result.add(path);
            }
        }

        return result;
    }
458746
private static Node getFirstNonEmptyChild(Node n) {
    for (Node c = n.getFirstChild(); c != null; c = c.getNext()) {
      if (c.isBlock()) {
        Node result = getFirstNonEmptyChild(c);
        if (result != null) {
          return result;
        }
      } else if (!c.isEmpty()) {
        return c;
      }
    }
    return null;
  }
452981
int getDelay(int n) {
        int delay = -1;
        if ((n >= 0) && (n < header.frameCount)) {
            delay = header.frames.get(n).delay;
        }
        return delay;
    }
1288679
private final int internalNext(int n) {
        if (n == BreakIterator.DONE || // at end or
                backwardsTrie == null) { // .. no backwards table loaded == no exceptions
            return n;
        }
        resetState();

        final int textLen = text.getLength();

        while (n != BreakIterator.DONE && n != textLen) {
            // outer loop runs once per underlying break (from fDelegate).
            // loops while 'n' points to an exception.

            if (breakExceptionAt(n)) {
                // n points to a break exception
                n = delegate.next();
            } else {
                // no exception at this spot
                return n;
            }
        }
        return n; //hit underlying DONE or break at end of text
    }
775528
public static List<Integer> sequence(final int start, int end, final int step) {

        final int size = (end-start)/step;
        if(size<0)  throw new IllegalArgumentException("List size is negative");

        return new AbstractList<Integer>() {
            public Integer get(int index) {
                if(index<0 || index>=size)
                    throw new IndexOutOfBoundsException();
                return start+index*step;
            }

            public int size() {
                return size;
            }
        };
    }
669136
private List<Double> getTopN(INDArray vec, int N) {
        BasicModelUtils.ArrayComparator comparator = new BasicModelUtils.ArrayComparator();
        PriorityQueue<Double[]> queue = new PriorityQueue<>(vec.rows(), comparator);

        for (int j = 0; j < vec.length(); j++) {
            final Double[] pair = new Double[] {vec.getDouble(j), (double) j};
            if (queue.size() < N) {
                queue.add(pair);
            } else {
                Double[] head = queue.peek();
                if (comparator.compare(pair, head) > 0) {
                    queue.poll();
                    queue.add(pair);
                }
            }
        }

        List<Double> lowToHighSimLst = new ArrayList<>();

        while (!queue.isEmpty()) {
            double ind = queue.poll()[1];
            lowToHighSimLst.add(ind);
        }
        return Lists.reverse(lowToHighSimLst);
    }
344640
public static int[] cs_post(int[] parent, int n)
	{
		int j, k = 0, post[], w[], head[], next[], stack[] ;
		if (parent == null) return (null) ;		/* check inputs */
		post = new int [n] ;				/* allocate result */
		w = new int [3*n] ;				/* get workspace */
		if (w == null || post == null) return (cs_idone (post, null, w, false)) ;
		head = w ; next = w ;
		int next_offset = n ;
		stack = w ;
		int stack_offset = 2*n ;
		for (j = 0 ; j < n ; j++) head [j] = -1 ;	/* empty linked lists */
		for (j = n-1 ; j >= 0 ; j--) /* traverse nodes in reverse order*/
		{
			if (parent [j] == -1) continue;		/* j is a root */
			next [next_offset + j] = head [parent [j]] ;  /* add j to list of its parent */
			head [parent [j]] = j ;
		}
		for (j = 0 ; j < n ; j++)
		{
			if (parent [j] != -1) continue ;	/* skip j if it is not a root */
			k = cs_tdfs(j, k, head, 0, next, next_offset, post, 0, stack, stack_offset) ;
		}
		return (post) ;
	}
1341311
protected List<R> visitChildren(ParentNode<? extends N> node) {
    List<R> results = new ArrayList<>(node.numChildren());
    for (N child : node.getChildren()) {
      results.add(visit(child));
    }
    return results;
  }
766364
public Set<N> getChildren(N n)
    {
        Pair<HashSet<N>, HashSet<N>> p = nodes.get(n);
        
        if(p == null)
            return null;
        
        return p.getOutgoing();
    }
470827
public <T> List<T> range(long start,long end){
    	Set<byte[]> result = null;
        try {    		
        	if(isCluster(groupName)){
        		result = getBinaryJedisClusterCommands(groupName).zrange(keyBytes, start, end);
        	}else{
        		result = getBinaryJedisCommands(groupName).zrange(keyBytes, start, end);
        	}
        	return toObjectList(new ArrayList<>(result));
    	} finally{
			getJedisProvider(groupName).release();
		}
	}
103386
public Set<N> getParents(N n)
    {
        Pair<HashSet<N>, HashSet<N>> p = nodes.get(n);
        
        if(p == null)
            return null;
        
        return p.getIncoming();
    }
16290
public Collection<Event> getEvents(final DateTime start, final DateTime end) {
        final Interval interval = new Interval(start, end);
        final Predicate<Event> withinInterval = new Predicate<Event>() {
            public boolean apply(Event input) {
                return interval.contains(input.getStart());
            }
        };
        final Collection<Event> values = eventById.values();
        return Collections2.filter(values, withinInterval);
    }
1369798
public long skip(long n) {
		long skipped=0L;
		int skip;
		while(n>0) {
			if(n<(skip=curr.remaining())) {
				curr.position(curr.position()+(int)n);
				skipped+=skip;
				n=0;
			} else {
				curr.position(curr.limit());
				
				skipped-=skip;
				if(idx<bbs.size()) {
					curr=bbs.get(idx++);
					n-=skip;
				} else {
					n=0;
				}
			}
		}
		return skipped;
	}
225380
NodeState<T> follow(StartElement element) {
        assert (element != null);
        for (NodeTransition<T> transition : transitions) {
            if (transition.getTest().matches(element)) {
                return transition.getTarget();
            }
        }
        return emptyState();
    }
450695
public final Node pop()
  {

    m_firstFree--;

    Node n = m_map[m_firstFree];

    m_map[m_firstFree] = null;

    return n;
  }