File: bbatch.Rd

package info (click to toggle)
r-cran-bit 4.0.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 996 kB
  • sloc: ansic: 5,083; makefile: 6
file content (38 lines) | stat: -rw-r--r-- 852 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chunkutil.R
\name{bbatch}
\alias{bbatch}
\title{Balanced Batch sizes}
\usage{
bbatch(N, B)
}
\arguments{
\item{N}{total size in 0..integer_max}

\item{B}{desired batch size in 1..integer_max}
}
\value{
a list with components \item{ b }{ the batch size } \item{ nb }{ the
number of batches } \item{ rb }{ the size of the rest }
}
\description{
\command{bbatch} calculates batch sizes in 1..N so that they have rather balanced
sizes than very different sizes.
}
\details{
Tries to have \code{rb==0} or \code{rb} as close to \code{b} as possible
while guaranteeing that \code{rb < b && (b - rb) <= min(nb, b)}
}
\examples{

  bbatch(100, 24)

}
\seealso{
\code{\link{repfromto}}, \code{\link[ff:ffapply]{ffvecapply}}
}
\author{
Jens Oehlschlägel
}
\keyword{IO}
\keyword{data}