<commit_before>package org.psjava.ds.graph;

import org.psjava.ds.Collection;
import org.psjava.javautil.DataFilter;
import org.psjava.javautil.FilteredIterable;

public class EdgeFilteredGraph {

	public static <V, E> Graph<V, E> wrap(final Graph<V, E> original, final DataFilter<E> filter) {
		return new Graph<V, E>() {
			@Override
			public Collection<V> getVertices() {
				return original.getVertices();
			}

			@Override
			public Iterable<E> getEdges() {
				return FilteredIterable.create(original.getEdges(), filter);
			}
		};
	}

}<commit_msg>add debug code<commit_after>package org.psjava.ds.graph;

import org.psjava.ds.Collection;
import org.psjava.javautil.DataFilter;
import org.psjava.javautil.FilteredIterable;

public class EdgeFilteredGraph {

	// TODO introduce SubGraph and replace this

	public static <V, E> Graph<V, E> wrap(final Graph<V, E> original, final DataFilter<E> filter) {
		return new Graph<V, E>() {
			@Override
			public Collection<V> getVertices() {
				return original.getVertices();
			}

			@Override
			public Iterable<E> getEdges() {
				return FilteredIterable.create(original.getEdges(), filter);
			}

			@Override
			public String toString() {
				return GraphToString.toString(this);
			}
		};
	}

}
{'fraction_non_alphanumeric': 0.1223021582733813, 'fraction_numerical': 0.0, 'mean_word_length': 4.195020746887967, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6537818', 'n_tokens_mistral': 472, 'n_tokens_neox': 416, 'n_words': 96}