GithubHelp home page GithubHelp logo

dariusz-piekarz / pybind11-vector-class Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.27 MB

Python module written in pybind11.

C 39.60% Python 1.32% C++ 59.08%
cpp data-container pybind11 python python-extension

pybind11-vector-class's Introduction

Based on pybind11, I created a Python module in C++. Possible minor changes and enhancements can be expected.

This module contains:

  • A function returning the n-th element of the Fibonacci sequence.

  • A function that returns numerical solution of the given ordinary differential equation (ODE) of order k:

    • x^{k}(t) = f(t, x(t),..., x^{k-1}(t))
    • x(t_{0}) = x_{0}
    • x'(t_{0}) = x'_{0}
    • ...
    • x^{k-1}(t_{0}) = x^{k-1}_{0}
  • A function returning a set of points (x, y, z) such that F(x, y, z) = 0 within provided bounds to each of variables x, y, z with provided error tolerance, nods granularity, and number of threads employed to find desired solution. Function uses string evaluation based on exprtk.hpp (see: https://www.partow.net/programming/exprtk/index.html ).

  • Vector class: This class is a 1-dimensional C++ container for template type data. Based on Vector class there is created a class Vector_d which is Python embedding of Vector<double>. Below is a list of functionalities available in the C++ class:

    • Template:
      • Default constructor
      • Constructor depending on the size of the Vector
      • Constructor based on the size of the Vector and a given coordinate
      • Constructor based on the std::vector data container
      • Constructor based on the object Vector
      • Destructor
    • Operators:
      • Assignation =
      • Comparison ==
      • Addition +
      • Coordinate-wise multiplication *
      • Multiplication by scalar *
      • Inner product operator ^
      • Input stream >>
      • Output stream <<
    • Insertion and appendation
    • Removal of coordinate by index or by value
    • Merge of two Vectors
    • Type conversion
    • Action of an external function in a given rolling window on Vector's coordinate
    • Sorting
    • Action of an external function on rows of several Vectors
    • Getting length and coordinate value by index
    • Iteration functionality (for Python usage only)
    • Modification of chosen coordinate
    • Returning of indices with provided values
    • Verification if a Vector has a given value stored in coords

pybind11-vector-class's People

Contributors

dariusz-piekarz avatar

Watchers

 avatar

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.