<commit_before>/*
 * Copyright 2012 ToureNPlaner
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package de.tourenplaner.computeserver;

import de.tourenplaner.algorithms.*;
import de.tourenplaner.computecore.AlgorithmManagerFactory;
import de.tourenplaner.computecore.AlgorithmRegistry;
import de.tourenplaner.computecore.ComputeCore;
import de.tourenplaner.computecore.SharingAMFactory;
import de.tourenplaner.config.ConfigManager;
import de.tourenplaner.graphrep.*;
import de.tourenplaner.server.CLIParser;

import java.io.*;
import java.util.*;
import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.logging.XMLFormatter;

/**
 * @author <NAME>, <NAME>, <NAME>, <NAME>
 */
public class ComputeServer {

    private static void registerAlgorithms(AlgorithmRegistry reg, GraphRep graph) {
        // reg.registerAlgorithm(new ShortestPathFactory(graph));
        reg.registerAlgorithm(new ShortestPathCHFactory(graph));
        reg.registerAlgorithm(new TravelingSalesmenFactory(graph));
        reg.registerAlgorithm(new NNSearchFactory(graph));
        reg.registerAlgorithm(new ConstrainedSPFactory(graph));
        reg.registerAlgorithm(new UpDownFactory(graph));
        reg.registerAlgorithm(new WayByNodeIdsFactory(graph));
    }

    private static Logger log = Logger.getLogger("de.tourenplaner");

    /**
     * @param graphName Original file name of the graph
     * @return The filename of the dumped graph
     */
    private static String dumpName(String graphName) {
        return graphName + ".dat";
    }

    private static Map<String, Object> getServerInfo(AlgorithmRegistry reg) {
        Map<String, Object> info = new HashMap<String, Object>(4);
        info.put("version", new Float(1.0));
        info.put("servertype", ConfigManager.getInstance().getEntryBool("private", false) ? "private" : "public");
<commit_msg>Activate new bidirectional Dijkstra algorithm<commit_after>/*
 * Copyright 2012 ToureNPlaner
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package de.tourenplaner.computeserver;

import de.tourenplaner.algorithms.*;
import de.tourenplaner.computecore.AlgorithmManagerFactory;
import de.tourenplaner.computecore.AlgorithmRegistry;
import de.tourenplaner.computecore.ComputeCore;
import de.tourenplaner.computecore.SharingAMFactory;
import de.tourenplaner.config.ConfigManager;
import de.tourenplaner.graphrep.*;
import de.tourenplaner.server.CLIParser;

import java.io.*;
import java.util.*;
import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.logging.XMLFormatter;

/**
 * @author <NAME>, <NAME>, <NAME>, <NAME>
 */
public class ComputeServer {

    private static void registerAlgorithms(AlgorithmRegistry reg, GraphRep graph) {
        // reg.registerAlgorithm(new ShortestPathFactory(graph));
        reg.registerAlgorithm(new ShortestPathBDCHFactory(graph));
        reg.registerAlgorithm(new ShortestPathCHFactory(graph));
        reg.registerAlgorithm(new TravelingSalesmenFactory(graph));
        reg.registerAlgorithm(new NNSearchFactory(graph));
        reg.registerAlgorithm(new ConstrainedSPFactory(graph));
        reg.registerAlgorithm(new UpDownFactory(graph));
        reg.registerAlgorithm(new WayByNodeIdsFactory(graph));
    }

    private static Logger log = Logger.getLogger("de.tourenplaner");

    /**
     * @param graphName Original file name of the graph
     * @return The filename of the dumped graph
     */
    private static String dumpName(String graphName) {
        return graphName + ".dat";
    }

    private static Map<String, Object> getServerInfo(AlgorithmRegistry reg) {
        Map<String, Object> info = new HashMap<String, Object>(4);
        info.put("version", new Float(1.0));
        info.put("servertype", ConfigManager.getInstance().getEntryBool("private", false) ? "private" : "public");

{'fraction_non_alphanumeric': 0.09998000399920016, 'fraction_numerical': 0.004399120175964807, 'mean_word_length': 4.073022312373225, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '531293', 'n_tokens_mistral': 1405, 'n_tokens_neox': 1381, 'n_words': 384}