Skip to content

Commit

Permalink
Doc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Romain committed Jan 23, 2025
1 parent 90a2a7c commit 77e60aa
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 34 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ revdep
CRAN-RELEASE
/doc/
/Meta/

autom4te.cache
autom4te.cache
config.log
config.status
17 changes: 8 additions & 9 deletions R/algorithm-dec.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#' Point Cloud Decimation Algorithm
#'
#' This function is made to be used in \link{decimate_points}. It implements an algorithm that
#' randomly removes points or pulses to reach the desired density over the whole area (see
#' \code{\link[=area]{area}}).
#' randomly removes points or pulses to reach the desired density over the area.
#'
#' @param density numeric. The desired output density.
#'
Expand Down Expand Up @@ -196,16 +195,16 @@ lowest = function(res = 1)

#' Point Cloud Decimation Algorithm
#'
#' Thes functions are made to be used in \link{decimate_points}. They implements algorithm that
#' These functions are made to be used in \link{decimate_points}. They implements algorithm that
#' creates a 3D grid with a given resolution and filters the point cloud by selecting
#' points of interest within each voxel. `random_per_voxel()` sample random points. `barycenter_per_voxel()`
#' samples the point that is the closest to the barycenter of the points within a given voxel.
#' `[lowest|highest}_attribute_per_voxel()` sample respectively the point that have the highest/lowest
#' `[lowest|highest]_attribute_per_voxel()` sample respectively the point that have the highest/lowest
#' attribute (e.g. Intensity) per voxel.
#'
#' @param res numeric. The resolution of the voxel grid used to filter the point cloud
#' @param n integer. The number of points to select
#' @param attribute. string name of an attribute (such as 'intensity')
#' @param attribute string name of an attribute (such as 'intensity')
#'
#' @examples
#' LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
Expand Down Expand Up @@ -235,7 +234,6 @@ random_per_voxel = function(res = 1, n = 1)
return(f)
}

#' @family point cloud decimation algorithms
#' @export
#' @rdname sample_per_voxel
barycenter_per_voxel = function(res = 1)
Expand All @@ -245,6 +243,8 @@ barycenter_per_voxel = function(res = 1)

f = function(las)
{
X <- Y <- Z <- NULL

id = C_voxel_id(las, res)

which.mean = function(X,Y,Z)
Expand All @@ -264,7 +264,6 @@ barycenter_per_voxel = function(res = 1)

}

#' @family point cloud decimation algorithms
#' @export
#' @rdname sample_per_voxel
lowest_attribute_per_voxel = function(res, attribute = "Z")
Expand All @@ -277,7 +276,8 @@ lowest_attribute_per_voxel = function(res, attribute = "Z")

f = function(las)
{
voxelID = lidR:::C_voxel_id(las, res)
tmp <- NULL
voxelID = C_voxel_id(las, res)
las@data$tmp = las@data[[attribute]]
return(las@data[, .I[which.min(tmp)], by = voxelID]$V1)
}
Expand All @@ -286,7 +286,6 @@ lowest_attribute_per_voxel = function(res, attribute = "Z")
return(f)
}

#' @family point cloud decimation algorithms
#' @export
#' @rdname sample_per_voxel
highest_attribute_per_voxel = function(res, attribute = "Z")
Expand Down
4 changes: 2 additions & 2 deletions R/knn.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#'
#' @return a list contains:
#' \enumerate{
#' \item[nn.index]{an n x k matrix for the nearest neighbor indice.}
#' \item[nn.dist]{an n x k matrix for the nearest neighbor Euclidean distances.}
#' \item **nn.index** an n x k matrix for the nearest neighbor indice.
#' \item **nn.dist** an n x k matrix for the nearest neighbor Euclidean distances.
#' }
#' @export
knn = function(data, k = 10)
Expand Down
4 changes: 2 additions & 2 deletions man/knn.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 7 additions & 17 deletions man/sample_per_voxel.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions man/sample_random.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/Makevars.win
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS) -I../inst/include/ -DRCPP_NO_MODULES
PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) $(SHLIB_OPENMP_CXXFLAGS)
CXX_STD = CXX17

0 comments on commit 77e60aa

Please sign in to comment.