Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
XNMaths is an Objective-C framework, designed to help you work with math classes and routines.
branch: master

This branch is even with xnutsive:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
English.lproj
XNMaths.xcodeproj
.gitignore
CubicSplineTest.h
CubicSplineTest.m
GCMathParser.h
GCMathParser.m
Info.plist
README.textile
SurfaceDataTest.h
SurfaceDataTest.m
Test-Info.plist
XN2DPlot.h
XN2DPlot.m
XN2DPoint.h
XN2DPoint.m
XN2DPointTest.h
XN2DPointTest.m
XN3DPlot.h
XN3DPlot.m
XN3DPoint.h
XN3DPoint.m
XN3DPointTest.h
XN3DPointTest.m
XNAbstractFunction.h
XNAbstractFunction.m
XNAbstractFunctionTest.h
XNAbstractFunctionTest.m
XNBox.h
XNBox.m
XNCubicSpline.h
XNCubicSpline.m
XNFloatRange.h
XNFloatRange.m
XNFunction+LagrangeInterpolation.h
XNFunction+LagrangeInterpolation.m
XNFunction+NewtonInterpolation.h
XNFunction+NewtonInterpolation.m
XNFunction.h
XNFunction.m
XNFunctionOf2D.h
XNFunctionOf2D.m
XNLineData.h
XNLineData.m
XNLinearEquationSystem.h
XNLinearEquationSystem.m
XNLinearEquationSystemTest.h
XNLinearEquationSystemTest.m
XNLinearSpline.h
XNLinearSpline.m
XNMaths.h
XNMaths_Prefix.pch
XNMatrix.h
XNMatrix.m
XNMatrixTest.h
XNMatrixTest.m
XNPlotManager.h
XNPlotManager.m
XNSurfaceData.h
XNSurfaceData.m
XNTabulatedFunctionOf2D.h
XNTabulatedFunctionOf2D.m
XNTabulatedFunctionOf2DTest.h
XNTabulatedFunctionOf2DTest.m
XNVector.h
XNVector.m
XNVectorTest.h
XNVectorTest.m
ZExpParser.h
ZExpParser.mm
version.plist

README.textile

XNMaths.framework

XNMaths is a small framework which provides some methematical classes and functions in Objective-C.
You might want to use it if you need a matrix class in Objective-C and you’re lazy enought not to use native C arrays with all the pain of pointer arithmetics.

It’s suitable for:

  • Drawing 2D function graphs by string expression.
  • Drawing surfaces is comming soon. We plan to provide a simple yet powerfull Objective-C interface wrapper to build beautiful, percise scientific graphs/plots really stunning simple.
  • Building math function interpolation polynomes (multiple methods are available: lagrange, newton, cubic splines and others are coming soon)
  • Solving linear equation systems with really simple Objective-C class model.
  • Solving hyperbolic, parabolic, elliptic equations is the killer feature: will be released in a month.

It provides:

  • XNVector and XNMatrix classes which store data internally as plain c arrays, which is fast.
  • XNFunction class which is math function class, which can build a function from expression string using GCMathParser. 2D functions, surfaces (functions of two and more arguments) are coming soon.
  • XNFunction also provides methods to build a interpolation of target function by array of points and interpolation methods (Lagrange and Newton are currently supported).
  • Plotting capabilities: is uses PLplot library to render 2Dplots. Full support of advanced 3D plotting is coming soon.
  • XNMatrix and XNVector class will provide basic linear algebra capabilities really soon, we’re working hard to wrap Apple’s Accelerate.framework with it’s cBLAS and cLAPACK native interfaces.
  • Test suite with SENTestingKit, covering XNMatrix, XNVector and most of XNFunction methods.
  • It’s own classes to work with native C types: XNFloat, XNDouble (if i’ll decide we need to go with it), XN2DPoint, etc. We need it to provide more consistend code. Using CGFloat is just not okay semantically.

More structured future plans

  • Equations subsystem and matrices will be rewritten to integrate with cLAPACK data format more percise and work faster with it.
  • Plotting subsystem is still unstable and needs more debugging / enchancing. I’d like not to use Aquaterm, if possible.

Contributing

I’d really appreciate if you give XNMaths a try. Just download the XNMaths.framework, build your hello world project with it and share your experience.
Example recipes are coming with the first public review :)

You can fork, modify and push, pull requests are appreciated. If you just need another feature and you want to discuss that first — just create an issue for that.

Something went wrong with that request. Please try again.