Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • F frackit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 10
    • Issues 10
    • List
    • Boards
    • Service Desk
    • Milestones
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • tools
  • frackit
  • Issues
  • #18

Closed
Open
Created Nov 10, 2020 by Dennis Gläser@DennisGlaeserOwner

unify style of geometric algorithms

For intersection angle computations, there is the IntersectionAngle class which contains the algorithms, while for computeMagnitude and computeDistance they are inside the free functions. This should probably be unified.

The advantage of an "algorithm class" is that it can be used as driver in some other place, and is thus modifiable by inheritance and modification of specific details.

One solution could be to add a free function

template<class Geo1, class Geo2, class Intersection, class AngleEngine = IntersectionAngle>
ctype computeAngle(const Geo1& geo1, const Geo2& geo2, const Intersection& is)
{ return AngleEngine()(geo1, geo2, is); }

where the engine defaults to the standard engine. Similarly, we could put computeMagnitude etc, also in "algorithm classes" and let the free functions have an additional template argument for the driver, with default.

Assignee
Assign to
Time tracking