This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------------------------------------------------------- | |
SCS v1.2.6 - Splitting Conic Solver | |
(c) Brendan O'Donoghue, Stanford University, 2012-2016 | |
---------------------------------------------------------------------------- | |
Lin-sys: sparse-direct, nnz in A = 375437 | |
eps = 1.00e-06, alpha = 1.80, max_iters = 20000, normalize = 1, scale = 5.00 | |
Variables n = 93962, constraints m = 263096 | |
Cones: primal zero / dual free vars: 75173 | |
linear vars: 1 | |
sd vars: 187922, sd blks: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Nemo | |
function power_by_cycles(a::perm, n::Int) | |
if n <0 | |
return inv(a)^-n | |
elseif n == 0 | |
return parent(a)() | |
elseif n == 1 | |
return deepcopy(a) | |
elseif n == 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module DirectProduct | |
using Nemo | |
import Base: show, ==, hash | |
import Base: ×, *, inv | |
import Nemo: parent, parent_type, elem_type | |
import Nemo: elements, order, Group, GroupElem, Ring |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Nemo | |
function power_by_cycles(a::Nemo.perm, n::Int) | |
if n <0 | |
return inv(a)^-n | |
elseif n == 0 | |
return parent(a)() | |
elseif n == 1 | |
return deepcopy(a) | |
elseif n == 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Nemo | |
using BenchmarkTools | |
function perm_sample(N=1000, samplesize=10000, seed=1234) | |
sample = Nemo.Generic.perm[] | |
srand(seed) | |
for i in 1:samplesize | |
push!(sample, rand(PermutationGroup(N))) | |
end | |
return sample |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------------------------------------------------------- | |
SCS v2.0.2 - Splitting Conic Solver | |
(c) Brendan O'Donoghue, Stanford University, 2012-2017 | |
---------------------------------------------------------------------------- | |
Lin-sys: sparse-direct, nnz in A = 7232838 | |
eps = 1.00e-14, alpha = 1.50, max_iters = 20000, normalize = 1, scale = 1.00 | |
acceleration_lookback = 20, rho_x = 1.00e-03 | |
Variables n = 13233, constraints m = 20463 | |
Cones: primal zero / dual free vars: 13621 | |
linear vars: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------------------------------------------------------- | |
SCS v2.0.2 - Splitting Conic Solver | |
(c) Brendan O'Donoghue, Stanford University, 2012-2017 | |
---------------------------------------------------------------------------- | |
Lin-sys: sparse-direct, nnz in A = 7232838 | |
eps = 1.00e-05, alpha = 1.50, max_iters = 5000, normalize = 1, scale = 1.00 | |
acceleration_lookback = 1, rho_x = 1.00e-03 | |
Variables n = 13233, constraints m = 20463 | |
Cones: primal zero / dual free vars: 13621 | |
linear vars: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module OrderStatistics | |
using StatsFuns | |
using Memoize | |
using IntervalArithmetic.Interval | |
import IntervalArithmetic.interval_from_midpoint_radius | |
import QuadGK.quadgk | |
export NormOrderStatistic, moment, expectation, expectationproduct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Nemo | |
using Base.Test | |
const PREC = 200 | |
const FF = AcbField(PREC) | |
const acb_struct = Nemo.acb_struct | |
import Base.* | |
function *(x::acb_struct, d::S, prec::Int=PREC) where S<:Int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
doc""" | |
elements!(G::PermGroup) | |
> Return an unsafe iterator over all permutations in `G`. Only one permutation | |
> is allocated and then modified in-place using the non-recursive | |
> [Heaps algorithm](https://en.wikipedia.org/wiki/Heap's_algorithm). | |
> | |
> Note: you need to explicitely copy permutations intended to be stored or | |
> modified. | |
# Examples: |
OlderNewer