From f6c214fb4dc1f94b8e71bf73260134a440e036c1 Mon Sep 17 00:00:00 2001 From: Sikorski Date: Tue, 31 Oct 2023 10:57:16 +0100 Subject: [PATCH] change name to PCCAPlus.jl c.f. #5 --- .github/workflows/CI.yml | 6 +++--- CITATION.bib | 6 +++--- Project.toml | 2 +- README.md | 12 ++++++------ docs/Manifest.toml | 2 +- docs/Project.toml | 2 +- docs/make.jl | 14 +++++++------- docs/src/index.md | 8 ++++---- ext/ArnoldiExt.jl | 4 ++-- ext/KrylovExt.jl | 4 ++-- src/{PCCA.jl => PCCAPlus.jl} | 2 +- test/runtests.jl | 8 ++++---- 12 files changed, 35 insertions(+), 35 deletions(-) rename src/{PCCA.jl => PCCAPlus.jl} (86%) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bbc196f..936dff0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -62,6 +62,6 @@ jobs: - run: | julia --project=docs -e ' using Documenter: DocMeta, doctest - using PCCA - DocMeta.setdocmeta!(PCCA, :DocTestSetup, :(using PCCA); recursive=true) - doctest(PCCA)' + using PCCAPlus + DocMeta.setdocmeta!(PCCAPlus, :DocTestSetup, :(using PCCAPlus); recursive=true) + doctest(PCCAPlus)' diff --git a/CITATION.bib b/CITATION.bib index 76eea92..a141326 100644 --- a/CITATION.bib +++ b/CITATION.bib @@ -1,7 +1,7 @@ -@misc{PCCA.jl, +@misc{PCCAPlus.jl, author = {Alexander Sikorski}, - title = {PCCA.jl}, - url = {https://github.com/axsk/PCCA.jl}, + title = {PCCAPlus.jl}, + url = {https://github.com/axsk/PCCAPlus.jl}, version = {v0.1.0}, year = {2021}, month = {11} diff --git a/Project.toml b/Project.toml index e970444..c66e61b 100644 --- a/Project.toml +++ b/Project.toml @@ -1,4 +1,4 @@ -name = "PCCA" +name = "PCCAPlus" uuid = "f48fc343-7e38-490c-be15-e66d68689cd5" authors = ["Alexander Sikorski"] version = "0.2.0" diff --git a/README.md b/README.md index 20a5e81..c409a20 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# PCCA +# PCCAPlus -[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://axsk.github.io/PCCA.jl/stable) -[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://axsk.github.io/PCCA.jl/dev) -[![Build Status](https://github.com/axsk/PCCA.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/axsk/PCCA.jl/actions/workflows/CI.yml?query=branch%3Amain) -[![Coverage](https://codecov.io/gh/axsk/PCCA.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/axsk/PCCA.jl) +[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://axsk.github.io/PCCAPlus.jl/stable) +[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://axsk.github.io/PCCAPlus.jl/dev) +[![Build Status](https://github.com/axsk/PCCAPlus.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/axsk/PCCAPlus.jl/actions/workflows/CI.yml?query=branch%3Amain) +[![Coverage](https://codecov.io/gh/axsk/PCCAPlus.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/axsk/PCCAPlus.jl) A [KISS](https://en.wikipedia.org/wiki/KISS_principle) style implementation of PCCA+ (Robust Perron Cluster Analysis) [1,2] with support for non-reversible systems [3]. For a similar python implementation see also the [cmdtools](https://github.com/zib-cmd/cmdtools/) package. @@ -11,7 +11,7 @@ For a similar python implementation see also the [cmdtools](https://github.com/z ## Basic usage ```julia -using PCCA +using PCCAPlus P=rand(10,10) P = P ./ sum(P, dims=2) # row stochastic matrix diff --git a/docs/Manifest.toml b/docs/Manifest.toml index 484c795..a96a80e 100644 --- a/docs/Manifest.toml +++ b/docs/Manifest.toml @@ -57,7 +57,7 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804" [[NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -[[PCCA]] +[[PCCAPlus]] path = ".." uuid = "f48fc343-7e38-490c-be15-e66d68689cd5" version = "0.1.0" diff --git a/docs/Project.toml b/docs/Project.toml index 0db7c77..a6d5122 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,3 +1,3 @@ [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -PCCA = "f48fc343-7e38-490c-be15-e66d68689cd5" +PCCAPlus = "f48fc343-7e38-490c-be15-e66d68689cd5" diff --git a/docs/make.jl b/docs/make.jl index aff35c9..7fa70a3 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,16 +1,16 @@ -using PCCA +using PCCAPlus using Documenter -DocMeta.setdocmeta!(PCCA, :DocTestSetup, :(using PCCA); recursive=true) +DocMeta.setdocmeta!(PCCAPlus, :DocTestSetup, :(using PCCAPlus); recursive=true) makedocs(; - modules=[PCCA], + modules=[PCCAPlus], authors="Alexander Sikorski", - repo="https://github.com/axsk/PCCA.jl/blob/{commit}{path}#{line}", - sitename="PCCA.jl", + repo="https://github.com/axsk/PCCAPlus.jl/blob/{commit}{path}#{line}", + sitename="PCCAPlus.jl", format=Documenter.HTML(; prettyurls=get(ENV, "CI", "false") == "true", - canonical="https://axsk.github.io/PCCA.jl", + canonical="https://axsk.github.io/PCCAPlus.jl", assets=String[], ), pages=[ @@ -19,6 +19,6 @@ makedocs(; ) deploydocs(; - repo="github.com/axsk/PCCA.jl", + repo="github.com/axsk/PCCAPlus.jl", devbranch="main", ) diff --git a/docs/src/index.md b/docs/src/index.md index d278a63..02eb523 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,14 +1,14 @@ ```@meta -CurrentModule = PCCA +CurrentModule = PCCAPlus ``` -# PCCA +# PCCAPlus -Documentation for [PCCA](https://github.com/axsk/PCCA.jl). +Documentation for [PCCAPlus](https://github.com/axsk/PCCAPlus.jl). ```@index ``` ```@autodocs -Modules = [PCCA] +Modules = [PCCAPlus] ``` diff --git a/ext/ArnoldiExt.jl b/ext/ArnoldiExt.jl index 9d12282..eb9bbaa 100644 --- a/ext/ArnoldiExt.jl +++ b/ext/ArnoldiExt.jl @@ -1,9 +1,9 @@ module ArnoldiExt -import PCCA +import PCCAPlus import ArnoldiMethod -function PCCA.schurvecs(T, n, israte, ::PCCA.ArnoldiSolver) +function PCCAPlus.schurvecs(T, n, israte, ::PCCAPlus.ArnoldiSolver) which = israte ? ArnoldiMethod.LR() : ArnoldiMethod.LM() Q = ArnoldiMethod.partialschur(T; nev=n, which)[1].Q Q[:, 1:n] diff --git a/ext/KrylovExt.jl b/ext/KrylovExt.jl index ea3113e..a397d3b 100644 --- a/ext/KrylovExt.jl +++ b/ext/KrylovExt.jl @@ -1,11 +1,11 @@ module KrylovExt -import PCCA +import PCCAPlus import KrylovKit -function PCCA.schurvecs(T, n, israte, ::PCCA.KrylovSolver) +function PCCAPlus.schurvecs(T, n, israte, ::PCCAPlus.KrylovSolver) which = israte ? :LR : :LM R, Qs, = KrylovKit.schursolve(T, rand(size(T, 1)), n, which, KrylovKit.Arnoldi()) Q = reduce(hcat, Qs) diff --git a/src/PCCA.jl b/src/PCCAPlus.jl similarity index 86% rename from src/PCCA.jl rename to src/PCCAPlus.jl index 99f64b1..11a492e 100644 --- a/src/PCCA.jl +++ b/src/PCCAPlus.jl @@ -1,4 +1,4 @@ -module PCCA +module PCCAPlus include("pccap.jl") include("schur.jl") diff --git a/test/runtests.jl b/test/runtests.jl index 0099d67..77dfb5c 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,10 +1,10 @@ -using PCCA +using PCCAPlus using Test using ArnoldiMethod using KrylovKit -@testset "PCCA.jl" begin +@testset "PCCAPlus.jl" begin # Write your tests here. x = rand(10, 10) x = x ./ sum(x, dims=2) @@ -20,10 +20,10 @@ using KrylovKit @testset "Reversible = $rev" for rev in [true, false] P = [randomstochasticmatrix(3 + mod(i, 12), rev) for i in 1:10] - @testset "Method $method" for method in [PCCA.BaseSolver, PCCA.ArnoldiSolver, PCCA.KrylovSolver] + @testset "Method $method" for method in [PCCAPlus.BaseSolver, PCCAPlus.ArnoldiSolver, PCCAPlus.KrylovSolver] for P in P, n in 2:size(P, 1)-1 χ = pcca(P, n, solver=method(), optimize=true) - a = PCCA.crispassignments(χ) + a = PCCAPlus.crispassignments(χ) #@show χ @test all(sum(χ, dims=2) .≈ 1)