<commit_before>#include <cmath>
#include <cstdlib>
#include <memory>
#include <vector>

#include "polyhedron.h"

#include "snub_dodecahedron.h"

int main() {
    std::vector<std::shared_ptr<Polyhedron>> polyhedra;

    // Add your name and polyhedron here!
    polyhedra.push_back(std::make_shared<SnubDodecahedron>("<NAME>"));

    // Don't edit below
    std::srand(1996);
    for (auto itr = polyhedra.begin(); itr != polyhedra.end(); itr++) {
        auto polyhedron = *itr;
        // Display polyhedron info
        printf("Examining the %s -\n", polyhedron->get_info().c_str());

        // Check that the polyhedron is convex
        if (!polyhedron->is_convex()) {
            printf("Error: This polyhedron is not convex!\n");
            return 1;
        }

        // Compute the volume
        double radius = ((double) std::rand() / (double) RAND_MAX) * 5.0 + 1.0;
        double volume = polyhedron->get_volume(radius);
        printf("    Volume: %llf @ radius = %llf - ", volume, radius);

        // Ensure the volume is valid (less than that of a sphere)
        double sphere_volume = 4.0 / 3.0 * 3.1415926535 * pow(radius, 3.0);
        if (volume > sphere_volume) {
            printf("Error: Volume is greater than the circumscribed sphere!\n");
            return 1;
        }

        printf("All Good\n");
    }
    printf("All polyhedra pass!\n");
    return 0;
}<commit_msg>Add Euler's formula test<commit_after>#include <cmath>
#include <cstdlib>
#include <memory>
#include <vector>

#include "polyhedron.h"

#include "snub_dodecahedron.h"

int main() {
    std::vector<std::shared_ptr<Polyhedron>> polyhedra;

    // Add your name and polyhedron here!
    polyhedra.push_back(std::make_shared<SnubDodecahedron>("<NAME>"));

    // Don't edit below
    std::srand(1996);
    for (auto itr = polyhedra.begin(); itr != polyhedra.end(); itr++) {
        auto polyhedron = *itr;
        // Display polyhedron info
        printf("Examining the %s:\n", polyhedron->get_info().c_str());

        // Check that the polyhedron is convex
        if (!polyhedron->is_convex()) {
            printf("Error: This polyhedron is not convex!\n");
            return 1;
        }

        // Compute the volume
        double radius = ((double) std::rand() / (double) RAND_MAX) * 5.0 + 1.0;
        double volume = polyhedron->get_volume(radius);
        printf("    Volume: %llf @ radius = %llf\n", volume, radius);

        // Ensure the volume is valid (less than that of a sphere)
        double sphere_volume = 4.0 / 3.0 * 3.1415926535 * pow(radius, 3.0);
        if (volume > sphere_volume) {
            printf("Error: Volume is greater than the circumscribed sphere!\n");
            return 1;
        }

        // Ensure Euler's formula holds
        int f = polyhedron->get_faces();
        int e = polyhedron->get_edges();
        int v = polyhedron->get_vertices();
        printf("    F = %d, V = %d, E = %d\n", f, v, e);

        if (f + v != e + 2) {
            printf("Error: Euler's formula does not hold! (F + V - E = 2)\n");
            return 1;
        }
    }
    printf("All polyhedra pass!\n");
    return 0;
}
{'fraction_non_alphanumeric': 0.14539682539682539, 'fraction_numerical': 0.01873015873015873, 'mean_word_length': 2.3521276595744682, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 30, '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': '5289787', 'n_tokens_mistral': 1078, 'n_tokens_neox': 986, 'n_words': 280}