service

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package service provides methods to solve differential equations in num methods, plot graphs of these solutions, calculate errors and plot the graphs of errors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	Plotter     graph.Plotter
	Solvers     []solver.Interface
	ExactSolver solver.Interface
}

Service provides methods to operate solvers, plot a graph, calculate errors

func (*Service) PlotGlobalErrors

func (s *Service) PlotGlobalErrors(nmin, nmax int, x0, y0, xEnd float64) (plot []byte, err error)

PlotGlobalErrors plots the graph of truncation errors

func (*Service) PlotLocalErrors

func (s *Service) PlotLocalErrors(stepSize, x0, y0, xEnd float64) (plot []byte, err error)

PlotLocalErrors plots the graph of truncation errors from solvers related to the exact solution

func (*Service) PlotSolutions

func (s *Service) PlotSolutions(stepSize, x0, y0, xEnd float64) (plot []byte, err error)

PlotSolutions solves the differential equation by Solvers with the given input data

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL