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 <armadillo> | |
#include <vector> | |
auto get_cluster_sim(const arma::mat& sim, const arma::uvec& cluster_a, const arma::uvec& cluster_b) | |
{ | |
arma::uvec combined_clusters = arma::join_cols(cluster_a, cluster_b); | |
arma::mat combined_sims = sim(combined_clusters, combined_clusters); | |
auto exemplar = combined_clusters(arma::mean(combined_sims).index_max()); | |
arma::vec exe_sims = sim.col(exemplar); |
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 <iostream> | |
#include <algorithm> | |
#include <cassert> | |
#include <vector> | |
#include <numeric> | |
#include <cmath> | |
#include <limits> | |
template<typename T> |
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
class poly | |
{ | |
const std::vector<double> xs; | |
const std::vector<double> ys; | |
std::vector<double> data; | |
auto& qs(int i, int j){return data[i * xs.size() + j];} | |
public: | |
poly(const std::vector<double> xs, const std::vector<double> ys): xs(xs), ys(ys), data(xs.size() * xs.size()) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
section .bss | |
buf_in: RESB 32 ;input buffer | |
buf_out: RESB 32 ;output buffer | |
section .data | |
str: db "Введите строку: " | |
str_len: equ $-str | |
section .text | |
global _start |
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 <Windows.h> | |
#include <GL\GL.h> | |
#include <glext.h> | |
#include <wglext.h> | |
#include <iostream> | |
#pragma comment(lib, "opengl32.lib") | |