Exh3d: 3d Exhausive Validification

View source: R/Exh.R

Exh3dR Documentation

3d Exhausive Validification

Description

3d Exhausive Validification

Usage

Exh3d(func = function(x,y,z) x^2+y^2+z^2<=sqrt(3^2+3^2+3^2),x=seq(from = -3, to = 3,by=.6),y=seq(from = -3, to = 3,by=.6),z=seq(from = -3, to = 3,by=.6))

Arguments

func

If a function is used to define the validification it should return a boolean vector with 3 independent variables in order e.g. x,y,z

Examples

Exh3d(func = function(x,y,z) x^2+y^2+z^2<=sqrt(3^2+3^2+3^2),x=seq(from = -3, to = 3,by=.6),y=seq(from = -3, to = 3,by=.6),z=seq(from = -3, to = 3,by=.6))

## The function is currently defined as

function(func,x=seq(from = -3, to = 3,by=.1),
                    y=seq(from = -3, to = 3,by=.1),
                    z=seq(from = -3, to = 3,by=.1)){
  message('start exhausive calculation')
  v = NULL
  for(i in x){
    for(j in y){
      for(k in z){
        if(func(i,j,k)==T) v<-rbind(v,c(i,j,k))
      }
    }
  }
  message('calculation finished')
  v
}

HaoLi111/MFVN documentation built on Jan. 5, 2023, 4:37 a.m.