This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <SFML/Graphics.hpp> | |
| #include <gmp.h> | |
| typedef double num; | |
| const unsigned int w = 256, h = 256; | |
| const unsigned int p = 256; | |
| sf::RenderWindow app(sf::VideoMode(w, h), "Mandelbrot Set"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef TIMER_H | |
| #define TIMER_H | |
| #include <chrono> | |
| template<class ClockT = std::chrono::high_resolution_clock, class Rep = uint_least64_t, class DefaultPeriod = std::nano> | |
| class Timer | |
| { | |
| public: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* MIT License | |
| * | |
| * Copyright (c) 2018 Samuel R. Belliveau | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef NEURALNETWORK_HPP | |
| #define NEURALNETWORK_HPP | |
| // size_t | |
| #include <cstdint> | |
| // Rand | |
| #include <cstdlib> | |
| #include <ctime> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef BITMANIPULATION_H | |
| #define BITMANIPULATION_H | |
| #include <cstdint> | |
| template<class T> | |
| inline bool getBit(const T& input, const std::size_t& bit) | |
| { | |
| const T bitMask = 0x1 << bit; | |
| return (input & bitMask) != 0x0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef GENERIC_HPP | |
| #define GENERIC_HPP 1 | |
| /*** Includes ***/ | |
| #include <cstdint> // std::size_t | |
| #include <array> // std::array | |
| /*** Class ***/ | |
| template<std::size_t size> | |
| class Generic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef SPGL_HPP | |
| #define SPGL_HPP 1 | |
| #include <cstdint> // Fixed Length Ints | |
| #include <array> // std::array | |
| #include <SDL.h> // Graphics | |
| namespace SPGL | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef BIGINT_HPP | |
| #define BIGINT_HPP | |
| #include <bitset> // std::bitset | |
| #include <cstdint> // std::size_t | |
| namespace Big | |
| { | |
| template<std::size_t bits> | |
| class Int |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* MIT License | |
| * Copyright (c) 2018 Sam R. Belliveau | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is | |
| * furnished to do so, subject to the following conditions: | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef EXAMPLE_SORTING_ALGORITHMS_HPP | |
| #define EXAMPLE_SORTING_ALGORITHMS_HPP | |
| #include <array> | |
| // std::array - Used to pass arrays | |
| #include <algorithm> | |
| // std::swap - Used to swap data | |
| #include <functional> |