<commit_before><?php

class LoaderAdjacencyMatrix implements Loader{
	
	private $debugMode = false;
	
	private function writeDebugMessage($messageString){
		if($this->debugMode){
			echo $messageString;
		}
		
	}
	
	public function getGraphFromFile($fileName)	{

		$graph = new Graph();

		$file = file($fileName);
		$vertexCount = $file[0];
		$edgeCounter = 0;
		
		$graph->createVertices($vertexCount);

		for ($i=0;$i<$vertexCount;$i++){

			// Add Vertices
			$this->writeDebugMessage("Adding vertex $i,");

			$thisVertex = $graph->getVertex($i);
			
			$currentEdgeList = explode("\t", $file[$i+1]);

			for ($k=0;$k<$vertexCount;$k++){
				
				// Add edges
				if($currentEdgeList[$k] != 0){
						
					$this->writeDebugMessage(" and edge #$edgeCounter: $i -> $k ");
					
					$thisVertex->createEdge($graph->getVertex($k));
					
					$edgeCounter++;
				}
			
			}
			$this->writeDebugMessage("\n");
		}
		return $graph;
	}
}<commit_msg>shouldn't this loader just creats directed edges? (change comment)<commit_after><?php

class LoaderAdjacencyMatrix implements Loader{
	
	private $debugMode = false;
	
	private function writeDebugMessage($messageString){
		if($this->debugMode){
			echo $messageString;
		}
		
	}
	
	public function getGraphFromFile($fileName)	{

		$graph = new Graph();

		$file = file($fileName);
		$vertexCount = $file[0];
		$edgeCounter = 0;
		
		$graph->createVertices($vertexCount);

		for ($i=0;$i<$vertexCount;$i++){

			// Add Vertices
			$this->writeDebugMessage("Adding vertex $i,");

			$thisVertex = $graph->getVertex($i);
			
			$currentEdgeList = explode("\t", $file[$i+1]);

			for ($k=0;$k<$vertexCount;$k++){
				
				// Add edges
				if($currentEdgeList[$k] != 0){
						
					$this->writeDebugMessage(" and edge #$edgeCounter: $i -> $k ");
					
					$thisVertex->createEdge($graph->getVertex($k));							//should this not be a directedEdge???
					
					$edgeCounter++;
				}
			
			}
			$this->writeDebugMessage("\n");
		}
		return $graph;
	}
}
{'fraction_non_alphanumeric': 0.1778557114228457, 'fraction_numerical': 0.006012024048096192, 'mean_word_length': 3.3698030634573306, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 21, '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': '324598', 'n_tokens_mistral': 849, 'n_tokens_neox': 657, 'n_words': 126}