MGC_Function: Moving Generator Cluster: Function

Description Usage Arguments Details See Also Examples

View source: R/MGC_Function.R

Description

Creates an evolving gaussian cluster for a DSD_MG who's behavior is determined by functions.

Usage

1
  MGC_Function(variance, density, center, cluster = NA)

Arguments

variance

a list of functions or a single function that gives the variance of the cluster

density

a function of time that gives the density of the cluster

center

a list of functions that detail the center of the cluster

cluster

the name of the cluster

Details

This allows for a creation of a Moving Generator Cluster that is defined by functions of time. The variance can either be a list of functions, one for every dimension, or it can be a single function so that a user can generate circular gaussian clusters. The number of functions that dictate the center of the gaussian cluster must also be equal to the number of dimensions.

The cluster attribute is useful if a user wishes to combine multiple MGCs to create a single macro cluster. To accomplish this, the user would simply assign each of the MGCs the same cluster name.

See Also

MGC_Linear, MGC_Noise, MGC_Random for details on other MGC objects. DSD_MG for details on how to use it within a DSD

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
  dsd <- DSD_MG()
  
  #Example of a list of variances. Allows for elliptical clusters.
  c1 <- MGC_Function(list(function(t){1},function(t){100}),function(t){25},list(function(t){t},function(t){t}))
  
  #Example of a single function variance. Allows for circular gaussian clusters.
  c2 <- MGC_Function(function(t){.1*t},function(t){25},list(function(t){sin(t/10)*50+50},function(t){t}))
  
  add_cluster(dsd,c1)
  add_cluster(dsd,c2)
  
  ## Not run: 
    animate_data(dsd,5000,xlim=c(0,100),ylim=c(0,100))
  
## End(Not run)

streamMovingGenerator documentation built on May 2, 2019, 5:26 p.m.