<commit_before>/*
 * Data Structures and Algorithms.
 * Copyright (C) 2016 <NAME>
 *
 * See the LICENSE file accompanying this source code, for
 * licensing restrictions that might apply.
 *
 */

package test;

import static java.lang.System.out;

import util.Hashtable;
import util.RobinHoodHash;

public class TestHashtable {
	public static void main(String...strings) throws Exception {
		String[] nomes = { "Rafael", "Ivonei", "Lossurdo", "Marcela", "Lucia",
				"Gustavo", "Guilherme", "Marcia", "Fabio", "Elmario", "Luciano",
				"Antonio", "Aline", "Marcelo" };
		String[] testNames = {"Rafael", "Ivonei", "Guilherme", "Antonio", "Aline",
				"Inexistente"};
		
		//Hashtable<String, Integer> hash = new Hashtable<>();
		
		RobinHoodHash<String, Integer> hash = new RobinHoodHash<>();
		
		
		for (int i = 0; i < nomes.length; i++) {
			hash.put(nomes[i],i);
			out.println("Itens: "+hash.size()+"\tLoad: "+hash.loadFactor());
			if (i == 9) {
				for (String tst : testNames) {
					out.println(tst + " retrieves " + hash.get(tst) );
				}
			}
			hash.print();
		}
		for (String tst : testNames) {
			out.println(tst + " retrieves " + hash.get(tst) );<commit_msg>Removed some debug info not required for the test.<commit_after>/*
 * Data Structures and Algorithms.
 * Copyright (C) 2016 <NAME>
 *
 * See the LICENSE file accompanying this source code, for
 * licensing restrictions that might apply.
 *
 */

package test;

import static java.lang.System.out;

import util.Hashtable;
import util.RobinHoodHash;

public class TestHashtable {
	public static void main(String...strings) throws Exception {
		String[] nomes = { "Rafael", "Ivonei", "Lossurdo", "Marcela", "Lucia",
				"Gustavo", "Guilherme", "Marcia", "Fabio", "Elmario", "Luciano",
				"Antonio", "Aline", "Marcelo" };
		String[] testNames = {"Rafael", "Ivonei", "Guilherme", "Antonio", "Aline",
				"Inexistente"};
		
		//Hashtable<String, Integer> hash = new Hashtable<>();
		RobinHoodHash<String, Integer> hash = new RobinHoodHash<>();
		
		
		for (int i = 0; i < nomes.length; i++) {
			hash.put(nomes[i],i);
			out.println("Itens: "+hash.size()+"\tLoad: "+hash.loadFactor());
		}
		for (String tst : testNames) {
			out.println(tst + " retrieves " + hash.get(tst) );
{'fraction_non_alphanumeric': 0.17172167707404104, 'fraction_numerical': 0.004906333630686887, 'mean_word_length': 3.9623893805309733, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 13, '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': '6019579', 'n_tokens_mistral': 893, 'n_tokens_neox': 792, 'n_words': 205}