Skip to content

Commit

Permalink
change name to PCCAPlus.jl
Browse files Browse the repository at this point in the history
c.f. #5
  • Loading branch information
axsk committed Oct 31, 2023
1 parent 400c23e commit f6c214f
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 35 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)'
6 changes: 3 additions & 3 deletions CITATION.bib
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "PCCA"
name = "PCCAPlus"
uuid = "f48fc343-7e38-490c-be15-e66d68689cd5"
authors = ["Alexander Sikorski"]
version = "0.2.0"
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# 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.

## Basic usage

```julia
using PCCA
using PCCAPlus

P=rand(10,10)
P = P ./ sum(P, dims=2) # row stochastic matrix
Expand Down
2 changes: 1 addition & 1 deletion docs/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
PCCA = "f48fc343-7e38-490c-be15-e66d68689cd5"
PCCAPlus = "f48fc343-7e38-490c-be15-e66d68689cd5"
14 changes: 7 additions & 7 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -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=[
Expand All @@ -19,6 +19,6 @@ makedocs(;
)

deploydocs(;
repo="github.com/axsk/PCCA.jl",
repo="github.com/axsk/PCCAPlus.jl",
devbranch="main",
)
8 changes: 4 additions & 4 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -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]
```
4 changes: 2 additions & 2 deletions ext/ArnoldiExt.jl
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
4 changes: 2 additions & 2 deletions ext/KrylovExt.jl
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/PCCA.jl → src/PCCAPlus.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module PCCA
module PCCAPlus

include("pccap.jl")
include("schur.jl")
Expand Down
8 changes: 4 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit f6c214f

Please sign in to comment.