無限座標を有限範囲に納める

  • 予定パッケージ名
    • SphereAndSimplex
  • 関数名
    • TangentDist
    • TangentDist2
    • ExponentialDist
  • タイトル
TangentDist
  • 説明
無限の範囲を限定範囲に縮める
  • 使用例
TangentDist(2,1/3)
  • ソース
# 無限遠をMaxXに縮めるときに距離Rをいくつに縮めるか
TangentDist<-function(R,MaxX){
	tmax<-atan(MaxX)
	tan(atan(R)/(pi/2)*tmax)
}


# 無限遠をMinXからMaxXに縮める

TangentDist2<-function(R,MinX,MaxX){
	tmax<-atan(MaxX)
	tmin<-atan(MinX)
	tcurrent<-atan(R)
	tan((tcurrent+pi/2)/(pi)*(tmax-tmin)+tmin)
}

# (0, \infty)への変換には指数関数も使える
ExponentialDist3<-function(R){
	exp(R)
}
  • Rdファイル
\name{TangentDist}
\alias{TangentDist}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
TangentDist
}
\description{
TangentDist()は-無限大から+無限大を-指定数から+指定数に縮める。
TangentDist2()は-無限大から+無限大を指定数1から指定数2に縮める。
ExponentialDist()は-無限大から+無限大を、0から+無限大に縮める
無限球座標を単位正単体に縮める
}
\usage{
TangentDist(2,1/3)
}
%- maybe also 'usage' for other objects documented here.
\details{
%%  ~~ If necessary, more details than the description above ~~
}
\value{

}
\references{
%% ~put references to the literature/web site here ~
}
\author{
%%  ~~who you are~~
}
\note{
%%  ~~further notes~~
}

%% ~Make other sections like Warning with \section{Warning }{....} ~

\seealso{
}
\examples{
TangentDist(2,1/3)
}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
\keyword{ ~kwd1 }
\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line