- GitHub
- GCP
- Docker Hub
- swift-playground を fork.
- 以下の Repository secrets を追加する(値の取り出し方は後述)
SSH_LOGIN_USER
SSH_PRIVATE_KEY
| import Foundation | |
| /* | |
| Algebraic Structures | |
| */ | |
| protocol Set: Equatable {} | |
| // A `Monoid` is a set endowed with the multiplication `*`, | |
| // and the multiplicative unit `id`. |
| import SwmCore | |
| import SwmKnots | |
| import SwmKR | |
| typealias R = RationalNumber | |
| let b = Braid.load("5_1")! | |
| // let b = Braid<anySize>(strands: 3, code: -1, -1, -1) | |
| print(b) |
| import SwmCore | |
| import SwmKnots | |
| import SwmKhovanov | |
| typealias R = Int | |
| // typealias R = RationalNumber | |
| let K = Link.load("3_1")! | |
| let Kh = KhovanovHomology<R>(K) |
| import SwmCore | |
| import SwmKnots | |
| import SwmKR | |
| typealias R = RationalNumber | |
| // Load knot/link by name. | |
| // There are presets up to 11 crossings. | |
| let K = Link.load("3_1")! | |
| print(K.name) |
SSH_LOGIN_USERSSH_PRIVATE_KEY| { | |
| "3_1": 1, | |
| "4_1": 1, | |
| "5_1": 1, | |
| "5_2": 3, | |
| "6_1": 3, | |
| "6_2": 1, | |
| "6_3": 1, | |
| "7_1": 1, | |
| "7_2": 5, |
| import Foundation | |
| typealias R = Double | |
| let step = 10 | |
| func unitRand() -> R { | |
| R(arc4random_uniform(UINT32_MAX)) / R(UINT32_MAX) | |
| } | |
| func forAnySmall(_ p: (R) -> Bool) -> Bool { |