A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://cran.rstudio.com/web/packages/Rcpp/../RcppArray/../Rcpp/../cpp11/../area/readme/README.html below:

README

area

The goal of area is to calculate areas, allow control over how that happens, and illustrate how it works.

Very much work in progress.

Please, do not use this for your land surveying contract.

Installation

You can install the development version from GitHub with:

The area package is written to allow easy to use calculations for developing packages. It’s similar to the traipse package which was created to leverage the grouping mechanisms of the tidyverse for common tracking data calculations.

library(area)
polygon_area(cbind(c(0, 1, 1, 0, 0), 
                c(0, 0, 1, 1, 0)))
#> [1] 1

triangle_area(cbind(c(0, 1, 1, 1, 0, 0), 
               c(0, 0, 1, 1, 1, 0)))
#> [1] 0.5 0.5

There’s an inbuilt data set with a path of Tasmania’s outline.

Straightforward?

Well - ha ha - we will need some ease of use here, and some speed ups - but we aren’t restricted to one in-memory format, we have the area of every component part to use as we wish (the grouping tells us about holes and multipolygons), we can tell the orientation of the polygon or triangle and get its area, and when we have the right tools we’ll only be using R and C++. Oh and we can calculate with triangles stored compactly.

The key motivation here is flexibility and working with triangles.

Performance is compelling, compare silicate::tri_area() to this C++ version

Code of Conduct

Please note that the area project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4