Coder Social home page Coder Social logo

exp's Issues

rings: add replacement for Lens type

The design intention for the Lens type in the rings package was to allow users to selectively magnify regions of the plot. This has benefits in genomics plotting and also in highly differentially dense graph plots. The approach was to provide a shim arc that adjusted the circumferential coordinates of arcs places on top of it. This was not properly wired through all the types that would need to know about it.

I still think this is a useful addition to the package, but I think a better approach would be to add an interface type:

// Lens modifies an Arc to allow it to adjust the magnification of regions of itself.
type Lens interface {
    // Focus returns a change in position for a given angle.
    // The returned delta must not result in an angle outside
    // the receiver's arc.
    Focus(theta Angle) (delta Angle)
}

With this change arcs that are being plotted onto will be queried for satisfaction of Lens and have the angular coordinates adjusted by the returned delta.

linsolve: for sparse matrix

Hello,

Now, design in linsolve/iterative.go is:

func Iterative(a MulVecToer, b *mat.VecDense, ...

Matrix a have matrix interface:

type MulVecToer interface {
	// MulVecTo computes A*x or Aᵀ*x and stores the result into dst.
	MulVecTo(dst *mat.VecDense, trans bool, x mat.Vector)
}

For my sparse matrix in my rep cannot implement that interface MulVecToer.

Could you replace type of variable a into type func(trans bool, x mat.Vector).
So, example linsolve/iterative_example_test.go look like:

...


ATx := func(trans bool, x mat.Vector){
       a.MulVecTo(mat.NewVecDense(dim, nil), trans, x)
}
result, err := linsolve.Iterative(ATx, sys.B, &linsolve.CG{}, nil)
if err != nil {
	fmt.Println("Error:", err)
	return
}

...

So, design in linsolve/iterative.go in my point of view:

func Iterative(a func(trans bool, x mat.Vector), b *mat.VecDense, ...

Feel free for ignore.

Proposal for ODE package: multistep methods

Proposal: multistep methods

Dear maintainers,
I am a Matlab user, and I am familiar with the ode solvers in Matlab.
In order to make gonum's ode package more complete (and more useful for people who need to solve a wide variety of ODEs), I would like to implement some multistep methods. To start, I aim to implement these three families of methods:

  • Adams-Bashfort,
  • Adams-Moulton,
  • Backward Difference Formula methods.

Of course, I'm going to keep the same structure of DormandPrince5 (i.e., implementing the Integrator interface).

Methods to implement

These are the coefficients for the methods that I wish to implement:

  1. Adams-Bashfort (explicit) methods
    Screenshot 2022-05-18 at 00 59 24

  2. Adams-Moulton (implicit) methods
    Screenshot 2022-05-18 at 00 59 31

  3. Backward Difference Formula methods
    Screenshot 2022-05-18 at 01 02 16

Thanks for your time,
Matteo Nicoli

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.