57 lines
1.6 KiB
C++
57 lines
1.6 KiB
C++
|
/*
|
||
|
* <Short Description>
|
||
|
* Copyright (C) 2024 Brett Terpstra
|
||
|
*
|
||
|
* This program is free software: you can redistribute it and/or modify
|
||
|
* it under the terms of the GNU General Public License as published by
|
||
|
* the Free Software Foundation, either version 3 of the License, or
|
||
|
* (at your option) any later version.
|
||
|
*
|
||
|
* This program is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
* GNU General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU General Public License
|
||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||
|
*/
|
||
|
#include <shifting.h>
|
||
|
#include <blt/math/vectors.h>
|
||
|
#include <vector>
|
||
|
#include <blt/std/hashmap.h>
|
||
|
|
||
|
inline constexpr char from_char(char c)
|
||
|
{
|
||
|
return c - 'a';
|
||
|
}
|
||
|
|
||
|
struct vertex
|
||
|
{
|
||
|
char name;
|
||
|
HASHSET<char> neighbours;
|
||
|
|
||
|
vertex(char name, const HASHSET<char>& n): name(from_char(name))
|
||
|
{
|
||
|
for (const auto& v : n)
|
||
|
neighbours.insert(from_char(v));
|
||
|
}
|
||
|
};
|
||
|
|
||
|
std::vector<vertex> edges = {
|
||
|
vertex{'a', {'i', 'e', 'b', 'j', 'h'}},
|
||
|
vertex{'b', {'a', 'e', 'c', 'j'}},
|
||
|
vertex{'c', {'e', 'd', 'f', 'j', 'b'}},
|
||
|
vertex{'d', {'e', 'f', 'c'}},
|
||
|
vertex{'e', {'h', 'f', 'd', 'c', 'b', 'a', 'i'}},
|
||
|
vertex{'f', {'d', 'e', 'h', 'g', 'j', 'c'}},
|
||
|
vertex{'g', {'j', 'f', 'h'}},
|
||
|
vertex{'h', {'j', 'g', 'f', 'e', 'i', 'a'}},
|
||
|
vertex{'i', {'e', 'a', 'h'}},
|
||
|
vertex{'j', {'a', 'b', 'c', 'f', 'g', 'h'}},
|
||
|
};
|
||
|
|
||
|
void calculate_ordering()
|
||
|
{
|
||
|
|
||
|
}
|