Skip to content

Commit

Permalink
Update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
AlainKadar committed Jan 3, 2025
1 parent 77017f3 commit dbf8973
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 24 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/conda-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# drop testing on macOS because of hours limits for private repos
#os: [ubuntu-latest, windows-latest] #, macOS-latest]
os: [macOS-latest]
python-version: ["3.13"]
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: ["3.12","3.13"]

steps:
- name: Checkout Code
Expand All @@ -27,6 +25,7 @@ jobs:
auto-update-conda: false
auto-activate-base: false
show-channel-urls: true
miniforge-version: latest

- name: Install package
shell: bash -l {0} # conda stetup requires this special shell
Expand Down
5 changes: 0 additions & 5 deletions BoundaryBetweennessCast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
#include "BoundaryBetweennessCast.h"
#include "Util.h"

#include <chrono>

#if IGRAPH_INTEGER_SIZE==64
typedef int64_t IG_LONG;
#elif IGRAPH_INTEGER_SIZE==32
Expand Down Expand Up @@ -41,16 +39,13 @@ void BoundaryBetweennessCast::boundary_betweenness_compute () {
igraph_vector_init_array(&weights_vec, weights_arr, num_edges);

//printf("Running\n");
std::chrono::steady_clock::time_point begin = std::chrono::steady_clock::now();
igraph_edge_betweenness_subset(g,
&res, /*igraph_vector_t *res*/
igraph_ess_all(IGRAPH_EDGEORDER_ID), /*igraph_es_t eids*/
false, /*igraph_bool_t directed*/
ig_sources, /*igraph_vs_t sources*/
ig_targets, /*igraph_vs_t targets*/
&weights_vec); /*igraph_vector_t *weights*/
std::chrono::steady_clock::time_point end = std::chrono::steady_clock::now();
// printf("Complete in %lld\n", std::chrono::duration_cast<std::chrono::microseconds>(end - begin).count());

betweennesses <<= res;

Expand Down
10 changes: 0 additions & 10 deletions RandomBoundaryBetweennessCast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,11 @@ void RandomBoundaryBetweennessCast::random_boundary_betweenness_compute () {
}

/*Invert Laplacian*/
std::chrono::steady_clock::time_point begin, end;
begin = std::chrono::steady_clock::now();
Eigen::MatrixXf pinv(num_verts, num_verts);
pinv = eigL.completeOrthogonalDecomposition().pseudoInverse();
end = std::chrono::steady_clock::now();
printf("Inversion complete in %lld\n", std::chrono::duration_cast<std::chrono::microseconds>(end - begin).count());
//std::cout << pinv << "\n";

/*LINEAR RANDOM BOUNDARY BETWEENNESS*/
begin = std::chrono::steady_clock::now();
std::vector<float> V(num_verts, 0);
linear_betweennesses.resize(num_edges);
igraph_integer_t from, to;
Expand All @@ -77,8 +72,6 @@ void RandomBoundaryBetweennessCast::random_boundary_betweenness_compute () {
}
}
}
end = std::chrono::steady_clock::now();
printf("Linear Complete in %lld\n", std::chrono::duration_cast<std::chrono::microseconds>(end - begin).count());
*/
//New method
float V_from, V_to;
Expand All @@ -99,7 +92,6 @@ void RandomBoundaryBetweennessCast::random_boundary_betweenness_compute () {
* location of non-zero elements a priori)
* Note that, for nonlinear random betweenness, the target vertex has
* changed to the ghost vertex*/
begin = std::chrono::steady_clock::now();
float sum = 0;
std::fill(V.begin(), V.end(), 0);
for (int i=0; i<num_verts; i++) {
Expand Down Expand Up @@ -151,8 +143,6 @@ void RandomBoundaryBetweennessCast::random_boundary_betweenness_compute () {
nonlinear_betweennesses[i] = abs(V[int(from)] - V[int(to)])*igraph_sparsemat_get(
&A, from, to);
}
end = std::chrono::steady_clock::now();
printf("NL Complete in %lld\n", std::chrono::duration_cast<std::chrono::microseconds>(end - begin).count());
igraph_destroy(g);
}

Expand Down
5 changes: 0 additions & 5 deletions VertexBoundaryBetweennessCast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
#include "VertexBoundaryBetweennessCast.h"
#include "Util.h"

#include <chrono>

#if IGRAPH_INTEGER_SIZE==64
typedef int64_t IG_LONG;
#elif IGRAPH_INTEGER_SIZE==32
Expand Down Expand Up @@ -40,16 +38,13 @@ void VertexBoundaryBetweennessCast::vertex_boundary_betweenness_compute () {
igraph_real_t* weights_arr = (double *)weights_ptr;
igraph_vector_init_array(&weights_vec, weights_arr, num_edges);

std::chrono::steady_clock::time_point begin = std::chrono::steady_clock::now();
igraph_betweenness_subset(g,
&res, /*igraph_vector_t *res*/
igraph_vss_all(), /*igraph_es_t eids*/
false, /*igraph_bool_t directed*/
ig_sources, /*igraph_vs_t sources*/
ig_targets, /*igraph_vs_t targets*/
&weights_vec); /*igraph_vector_t *weights*/
std::chrono::steady_clock::time_point end = std::chrono::steady_clock::now();
//printf("Complete in %lld\n", std::chrono::duration_cast<std::chrono::microseconds>(end - begin).count());

betweennesses <<= res;

Expand Down

0 comments on commit dbf8973

Please sign in to comment.