private void sampleRec(Node node) {
        if (sampleNodeCount >= targNodeCount) {
            return;
        }
        
        List<Node> candidates = new LinkedList<Node>();
        for (Edge edge : node.getOutEdges()) {
            Node outNode = edge.getTarget();
            if (!outNode.getFlag()) {
                candidates.add(outNode);
            }
        }
        
        Collections.shuffle(candidates);
        
        int count = RandomGenerator.nextGeometric(0.2);
        
        for (Node c : candidates) {
            if (count <= 0) {
                break;
            }
            count--;
            
            c.setFlag(true);
            sampleNodeCount++;
            if (sampleNodeCount >= targNodeCount) {
                return;
            }
        }
        for (Node c : candidates) {
            if (count <= 0) {
                break;
            } 
            sampleRec(c);
        }
    }