Distances on Directed Graphs in R
at main 59 lines 1.7 kB view raw
1#pragma once 2 3#include <memory> 4#include <vector> 5#include <algorithm> // std::fill, std::reverse 6#include <iostream> 7#include <fstream> 8 9#include <Rcpp.h> 10// [[Rcpp::plugins(cpp11)]] 11// [[Rcpp::depends(RcppParallel,RcppThread)]] 12#include <RcppThread.h> 13#include <RcppParallel.h> 14 15#include "pathfinders.h" 16 17class DGraph; 18class PathFinder; 19 20//---------------------------- 21//----- functions in flows.cpp 22//---------------------------- 23 24Rcpp::NumericVector rcpp_flows_aggregate_par (const Rcpp::DataFrame graph, 25 const Rcpp::DataFrame vert_map_in, 26 Rcpp::IntegerVector fromi, 27 Rcpp::IntegerVector toi_in, 28 Rcpp::NumericMatrix flows, 29 const bool norm_sums, 30 const double tol, 31 const std::string heap_type); 32 33Rcpp::NumericVector rcpp_flows_aggregate_pairwise (const Rcpp::DataFrame graph, 34 const Rcpp::DataFrame vert_map_in, 35 Rcpp::IntegerVector fromi, 36 Rcpp::IntegerVector toi, 37 Rcpp::NumericVector flows, 38 const bool norm_sums, 39 const double tol, 40 const std::string heap_type); 41 42Rcpp::NumericVector rcpp_flows_disperse_par (const Rcpp::DataFrame graph, 43 const Rcpp::DataFrame vert_map_in, 44 Rcpp::IntegerVector fromi, 45 Rcpp::NumericVector k, 46 Rcpp::NumericVector dens, 47 const double &tol, 48 std::string heap_type); 49 50Rcpp::NumericVector rcpp_flows_si (const Rcpp::DataFrame graph, 51 const Rcpp::DataFrame vert_map_in, 52 Rcpp::IntegerVector fromi, 53 Rcpp::IntegerVector toi_in, 54 Rcpp::NumericVector kvec, 55 Rcpp::NumericVector dens_from, 56 Rcpp::NumericVector dens_to, 57 const bool norm_sums, 58 const double tol, 59 const std::string heap_type);