restructure files

This commit is contained in:
2019-09-13 23:37:58 -04:00
parent 61c4a278f5
commit bd00ccf442
5 changed files with 45 additions and 44 deletions

View File

@@ -13,7 +13,6 @@ add_custom_command(
${CMAKE_CURRENT_BINARY_DIR}/shaders
)
add_executable(coxeter src/tc.cpp)
add_executable(mirror src/mirror.cpp)
add_executable(coxeter scr/coxeter.cpp)
add_executable(mirror src/mirrors.cpp)
target_link_libraries(mirror PRIVATE glm)

27
cosets/src/coxeter.cpp Normal file
View File

@@ -0,0 +1,27 @@
#include "util/coxeter.hpp"
int main(int argc, char *argv[]) {
std::vector<std::vector<int>> ids{
{0, 0},
{1, 1},
{2, 2},
{0, 1, 0, 1, 0, 1, 0, 1},
{1, 2, 1, 2, 1, 2},
{0, 2, 0, 2}
};
Table *table = solve(3, {0, 1}, ids);
std::cout << table->size() << std::endl;
std::cout << *table << std::endl;
for (const auto &v : table->words()) {
std::cout << "[ ";
for (auto e : v) {
std::cout << e << " ";
}
std::cout << "]\n";
}
return 0;
}

15
cosets/src/mirrors.cpp Normal file
View File

@@ -0,0 +1,15 @@
#include "util/mirrors.hpp"
int main(int argc, char *argv[]) {
auto normals = mirror<3>({
{},
{4},
{2, 3}
});
for (const auto &normal : normals) {
std::cout << glm::to_string(normal) << std::endl;
}
return 0;
}

View File

@@ -195,29 +195,3 @@ std::ostream &operator<<(std::ostream &out, const Table &table) {
return out;
}
int main(int argc, char *argv[]) {
std::vector<std::vector<int>> ids{
{0, 0},
{1, 1},
{2, 2},
{0, 1, 0, 1, 0, 1, 0, 1},
{1, 2, 1, 2, 1, 2},
{0, 2, 0, 2}
};
Table *table = solve(3, {0, 1}, ids);
std::cout << table->size() << std::endl;
std::cout << *table << std::endl;
for (const auto &v : table->words()) {
std::cout << "[ ";
for (auto e : v) {
std::cout << e << " ";
}
std::cout << "]\n";
}
return 0;
}

View File

@@ -5,7 +5,7 @@
#include <glm/gtx/string_cast.hpp>
#include <iomanip>
#include "util/numeric.hpp"
#include "numeric.hpp"
template<int N>
std::vector<glm::vec4> mirror(const float (&arr)[N][N]) {
@@ -32,17 +32,3 @@ std::vector<glm::vec4> mirror(const float (&arr)[N][N]) {
return mirrors;
}
int main(int argc, char *argv[]) {
auto normals = mirror<3>({
{},
{4},
{2, 3}
});
for (const auto &normal : normals) {
std::cout << glm::to_string(normal) << std::endl;
}
return 0;
}