Skip to content

Instantly share code, notes, and snippets.

View gasagna's full-sized avatar

Davide Lasagna gasagna

  • University of Southampton
  • United Kingdom
View GitHub Profile
@gasagna
gasagna / crash.jl
Last active September 9, 2016 17:41
import Base: start, done, next, length
import Sundials: N_Vector,
NVector,
realtype,
DlsMat,
CVodeInit,
CVodeCreate,
CVodeSStolerances,
CVodeReInit,
@gasagna
gasagna / parrays.jl
Created August 21, 2016 15:54
Example implementation of ND array with periodic indexing
import Base: getindex,
size,
linearindexing,
LinearSlow
# Type parameters are
# T : element type
# N : array dimensions
# P : tuple of booleans for periodic/non-periodic
# S : tuple of array size, precomputed so avoid repeated run-time calculation
@gasagna
gasagna / data.jl
Last active August 29, 2015 14:07
Julia wrapper for FANN library
# This type definition is generated automatically using Clang.jl
# It contains training data used by FANN
type fann_train_data
errno_f::fann_errno_enum
error_log::Ptr{FILE}
errstr::Ptr{Uint8}
num_data::Uint32
num_input::Uint32
num_output::Uint32
input::Ptr{Ptr{fann_type}}