lcm_io.c
のprintf
で変数z
はlong long int
なので%d
ではなく%lld
で受ける必要がある- 同個所で引数の数よりも余計に
%d
があるのを削除 lib_e.c
でexit
を使うためにstdlib.h
をincludelib_e.c
のprintf
のフォーマット文字列で、引数がsize_t
なので%d
ではなく%zd
で受ける必要がある
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
prop3a-step | |
: ∀ a | |
→ (∀ a' → (a' <′ a) → ∀ b' c' → (a' ² + b' ² ≡ 3 * c' ²) → a' ≡ 0) | |
→ ∀ b c → (a ² + b ² ≡ 3 * c ²) → a ≡ 0 | |
prop3a-step zero rec b c P = refl | |
prop3a-step (suc n) rec b c P = body | |
where | |
open ≡-Reasoning | |
a = suc n |
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
diff -uprN open-wbo.orig/Makefile open-wbo/Makefile | |
--- open-wbo.orig/Makefile 2015-01-02 23:11:06.000000000 -0500 | |
+++ open-wbo/Makefile 2015-01-08 08:48:47.418892000 -0500 | |
@@ -10,10 +10,14 @@ | |
# SOLVERDIR = minisat | |
# NSPACE = Minisat | |
# | |
+#VERSION = core | |
+#SOLVERNAME = "Glucose3.0" | |
+#SOLVERDIR = glucose3.0 |
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
-- Naive implementation of alpha algorithm for descovering petri-nets from event logs | |
import Control.Monad | |
import Data.Set (Set) | |
import qualified Data.Set as Set | |
data Arc p t | |
= P2T p t | |
| T2P t p | |
deriving (Eq, Ord, Show) |
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
-- | Naive implementation of alpha algorithm for descovering petri-nets from event logs | |
-- | |
-- References: | |
-- | |
-- * Wil van der Aalst, "Process Mining: Data science in Action", Week 2, | |
-- https://www.coursera.org/course/procmin | |
import Control.Monad | |
import Data.MultiSet (MultiSet) -- http://hackage.haskell.org/package/multiset | |
import qualified Data.MultiSet as MultiSet |
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
{-# LANGUAGE ScopedTypeVariables, BangPatterns #-} | |
-- | This module provides two functionality: | |
-- | |
-- * Learning transition systems from event logs | |
-- | |
-- * Transforming the transition system into an equivalent Petri net using state-based regions. | |
-- | |
-- References: | |
-- | |
-- * Wil van der Aalst, "Process Mining: Data science in Action", Week 3, |
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
from pycryptosat import Solver | |
class Encoder(): | |
def __init__(self, solver, n = 1): | |
self._solver = solver | |
self._n = n | |
self._ite_cache = {} | |
self._true = None | |
def newvar(self): |
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
import Data.List | |
import qualified Data.Vector as V | |
import qualified Data.Vector.Storable as VS | |
import qualified Data.Vector.Generic as VG | |
import Numeric.AD | |
-- from http://hackage.haskell.org/package/l-bfgs-b | |
import qualified Numeric.LBFGSB as LBFGSB | |
import qualified Numeric.LBFGSB.Result as R | |
type Weight = 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
{-# LANGUAGE ScopedTypeVariables #-} | |
import qualified Data.Vector.Storable as VS | |
import Data.Vector.Generic ((!)) | |
import qualified Data.Vector.Generic as VG | |
import Ipopt.Raw | |
( addIpoptNumOption, | |
addIpoptStrOption, | |
addIpoptIntOption, | |
ipoptSolve, | |
createIpoptProblemAD, |
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
#!/usr/bin/env python | |
import numpy as np | |
import six | |
import chainer | |
from chainer import computational_graph as c | |
from chainer import cuda | |
import chainer.functions as F | |
from chainer import optimizers |
OlderNewer