Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/17/18 04:47:09 (6 years ago)
Author:
hmaislin
Message:

#2929: Fixed result error

Location:
branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/go-code
Files:
10 added
10 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/go-code/go-pge/plug/bbsr.go

    r16191 r16231  
    1010
    1111func (PS *PgeSearch) GenInitExpr() *probs.ReportQueue {
    12 
    13   fmt.Println("Call gen method")
    14 
    15 
    1612  switch PS.cnfg.initMethod {
    1713  case "method1":
  • branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/go-code/go-pge/plug/pge.go

    r16230 r16231  
    3232var probDepndNames []string
    3333
    34 var stepResult []*pge.PeelResult
    35 var lastStepRes *pge.PeelResult
     34var stepResult probs.ExprReportArray
     35var lastStepRes *probs.ExprReport
    3636var resultNr int
    3737
    3838var nCurrentCoeff int
    3939var nMaxCoeff int
     40
     41var nLastResults int
    4042
    4143//export InitSearch
     
    4850  testDatasN = 0
    4951  trainDatasN = 0
    50 
     52  nLastResults = 0
    5153  cps.CreateDS(maxGen, pgeRptEpoch, pgeRptCount, pgeArchiveCap, peelCnt, evalrCount, zeroEpsilon, goInitMethod, goGrowMethod, sortType)
    5254 
     
    7981  probDepndNames = goDepndNames
    8082 
    81   trainData.InitTrainDataF(goIndepNames, goDepndNames, matrix, nEntries)
     83  trainData.InitTrainData(goIndepNames, goDepndNames, matrix, nEntries)
    8284 
    8385  trainDatas[trainDatasN] = trainData
     
    9395  goDepndNames := strings.Split(C.GoString(depndNames), " ")
    9496 
    95   testData.InitTestDataF(goIndepNames, goDepndNames, matrix, nEntries)
     97  testData.InitTrainData(goIndepNames, goDepndNames, matrix, nEntries)
    9698  testDatas[testDatasN] = testData
    9799  testDatasN++
     
    135137    epcomm.Rpts = make(chan *probs.ExprReportArray, 64)
    136138  epcomm.Gen = make(chan [2]int, 64)
     139 
    137140  fmt.Printf("6\n")
    138141 
     
    195198  *testscore = 0
    196199 
    197   if resultNr < cps.GetPeelCount() {
     200  if resultNr < len(stepResult) && stepResult != nil {
    198201    elem := stepResult[resultNr]
    199202    resultNr++
    200203    lastStepRes = elem
     204    *bestlen1 = len(stepResult)
    201205    if(elem != nil) {
    202       if elem.Nobestpush {
    203         *nobestpush = 1;
    204       } else {
    205         if elem.BestNewMinErr {
    206           *bestnewminerr = 1
    207         }
    208         *testscore = elem.TestScore
    209         *ncoeff = len(elem.Coeff)
     206      //if elem.Nobestpush {
     207      //  *nobestpush = 1;
     208      //} else {
     209      //  if elem.BestNewMinErr {
     210          *bestnewminerr = int(elem.TestError())
     211      //  }
     212        *testscore = elem.TestScore()
     213        *ncoeff = len(elem.Coeff())
    210214        nCurrentCoeff = 0
    211         nMaxCoeff = len(elem.Coeff)
    212         *bestlen1 = elem.Bestlen1
    213         *bestlen2 = elem.Bestlen2
    214         return C.CString(elem.Expre.String())
    215       }
     215        nMaxCoeff = len(elem.Coeff())
     216        //*bestlen1 = 0 //elem.Bestlen1
     217        *bestlen2 = 0 //elem.Bestlen2
     218        return C.CString(elem.Expr().String())
     219      //}
    216220    }
    217221  }
     
    226230    //*item = elem.Coeff[i]
    227231   
    228     res = lastStepRes.Coeff[nCurrentCoeff]
     232    coeffs := lastStepRes.Coeff()
     233    res = coeffs[nCurrentCoeff]
    229234  }
    230235  nCurrentCoeff++
     
    233238
    234239//export StepW
    235 func StepW() {
     240func StepW() int {
    236241  resultNr = 0
    237   stepResult = cps.SingleStep()
     242  stepResult = nil
     243  nRes := cps.Step()
     244 
     245  resu, ok := <-epcomm.Rpts
     246 
     247  //_ = ok
     248 
     249  resultNr = nLastResults
     250 
     251  nNew := 0
     252  if ok && resu != nil {
     253    stepResult = *resu
     254    nNew = nRes - nLastResults
     255    nLastResults = nRes
     256  }
     257   
     258  return nNew
    238259}
    239260
  • branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/go-code/go-pge/plug/pge_init_method_1.go

    r16191 r16231  
    1212
    1313  GP := PS.cnfg.treecfg
     14  fmt.Printf("%v\n", GP)
    1415
    1516  eList := make([]expr.Expr, 0)
     
    3132  // exprs.SetSort(PS.cnfg.sortType)
    3233  exprs.SetSort(probs.PESORT_PARETO_TST_ERR)
    33  
     34
    3435  for i, e := range eList {
    35  
     36    fmt.Printf("%d:  %v\n", i, e)
    3637    serial := make([]int, 0, 64)
    3738    serial = e.Serial(serial)
    3839    PS.Trie.InsertSerial(serial)
    3940    // on train data
    40 
    41     //fmt.Printf("RegressExpr:  e: %v  || PS.prob: %v\n", e, PS.prob)
    42     re := RegressExpr(e, PS.prob)  //DER DO
    43     //fmt.Printf("RegressExpr:  e: %v  || PS.prob: %v || %v \n", e, PS.prob, re)
    44    
     41    re := RegressExpr(e, PS.prob)
    4542    re.SetUnitID(i)
    4643    exprs.Push(re)
    4744  }
    48 
    4945  exprs.Sort()
    5046  return exprs
  • branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/go-code/go-pge/plug/pge_search.go

    r16191 r16231  
    1717)
    1818
    19 type PgeConfig struct {
     19type pgeConfig struct {
    2020  // search params
    2121  maxGen        int
     
    4040func pgeConfigParser(field, value string, config interface{}) (err error) {
    4141
    42   PC := config.(*PgeConfig)
     42  PC := config.(*pgeConfig)
    4343
    4444  switch strings.ToUpper(field) {
     
    9292type PgeSearch struct {
    9393  id   int
    94   cnfg PgeConfig
     94  cnfg pgeConfig
    9595  prob *probs.ExprProblem
    9696  iter int
     
    151151  return PS.cnfg.maxGen
    152152}
    153 func (PS *PgeSearch) GetPeelCount() int {
    154   return PS.cnfg.peelCnt
    155 }
    156153func (PS *PgeSearch) SetMaxIter(iter int) {
    157154  PS.cnfg.maxGen = iter
     
    183180
    184181func (PS *PgeSearch) Init(done chan int, prob *probs.ExprProblem, logdir string, input interface{}) {
    185 
    186   //fmt.Printf("Init'n PGE\n")
     182  fmt.Printf("Init'n PGE\n")
    187183  // setup data
    188184
    189185  // open logs
    190186  PS.initLogs(logdir)
    191  
    192   PS.stop = false
    193187
    194188  // copy in common config options
     
    201195  PS.cnfg.simprules = srules
    202196
    203   //fmt.Println("Roots:   ", PS.cnfg.treecfg.RootsS)
    204   //fmt.Println("Nodes:   ", PS.cnfg.treecfg.NodesS)
    205   //fmt.Println("Leafs:   ", PS.cnfg.treecfg.LeafsS)
    206   //fmt.Println("NonTrig: ", PS.cnfg.treecfg.NonTrigS)
     197  fmt.Println("Roots:   ", PS.cnfg.treecfg.RootsS)
     198  fmt.Println("Nodes:   ", PS.cnfg.treecfg.NodesS)
     199  fmt.Println("Leafs:   ", PS.cnfg.treecfg.LeafsS)
     200  fmt.Println("NonTrig: ", PS.cnfg.treecfg.NonTrigS)
    207201
    208202  PS.GenRoots = make([]expr.Expr, len(PS.cnfg.treecfg.Roots))
     
    226220
    227221    case expr.VAR:
    228       //fmt.Println("Use Vars: ", PS.cnfg.treecfg.UsableVars)
     222      fmt.Println("Use Vars: ", PS.cnfg.treecfg.UsableVars)
    229223      for _, i := range PS.cnfg.treecfg.UsableVars {
    230224        PS.GenLeafs = append(PS.GenLeafs, expr.NewVar(i))
     
    245239  ***/
    246240
    247   //fmt.Println("Roots:   ", PS.GenRoots)
    248   //fmt.Println("Nodes:   ", PS.GenNodes)
    249   //fmt.Println("Leafs:   ", PS.GenLeafs)
    250   //fmt.Println("NonTrig: ", PS.GenNonTrig)
     241  fmt.Println("Roots:   ", PS.GenRoots)
     242  fmt.Println("Nodes:   ", PS.GenNodes)
     243  fmt.Println("Leafs:   ", PS.GenLeafs)
     244  fmt.Println("NonTrig: ", PS.GenNonTrig)
    251245
    252246  // setup communication struct
     
    260254  PS.Best = probs.NewReportQueue()
    261255  PS.Best.SetSort(probs.GPSORT_PARETO_TST_ERR)
    262 
    263256  PS.Queue = PS.GenInitExpr()
    264257  PS.Queue.SetSort(probs.PESORT_PARETO_TST_ERR)
     
    283276      continue
    284277    }
    285     re := RegressExpr(e, PS.prob)
    286     //fmt.Printf("reg: %v\n", re)
    287     PS.eval_out <- re
     278    PS.eval_out <- RegressExpr(e, PS.prob)
    288279  }
    289280
     
    293284  fmt.Printf("Running PGE\n")
    294285
    295   PS.Loop()
     286  PS.loop()
    296287
    297288  fmt.Println("PGE exitting")
     
    301292}
    302293
    303 func (PS *PgeSearch) Loop() {
     294func (PS *PgeSearch) loop() {
    304295
    305296  PS.checkMessages()
     
    307298
    308299    fmt.Println("in: PS.step() ", PS.iter)
    309     PS.Step()
     300    PS.step()
    310301
    311302    // if PS.iter%PS.cnfg.pgeRptEpoch == 0 {
     
    357348}
    358349
    359 func (PS *PgeSearch) Step() {
     350func (PS *PgeSearch) step() {
     351
    360352  loop := 0
    361353  eval_cnt := 0 // for channeled eval
     
    437429  // } // for sequential eval
    438430  PS.Queue.Sort()
     431
    439432}
    440433
     
    442435  es := make([]*probs.ExprReport, PS.cnfg.peelCnt)
    443436  for p := 0; p < PS.cnfg.peelCnt && PS.Queue.Len() > 0; p++ {
     437
    444438    e := PS.Queue.Pop().(*probs.ExprReport)
     439
    445440    bPush := true
    446441    if len(e.Coeff()) == 1 && math.Abs(e.Coeff()[0]) < PS.cnfg.zeroEpsilon {
     
    451446
    452447    if bPush {
    453       fmt.Printf("pop/push DO(%d,%d): %v\n", p, PS.Best.Len(), e.Expr())
     448      fmt.Printf("pop/push(%d,%d): %v\n", p, PS.Best.Len(), e.Expr())
    454449      PS.Best.Push(e)
    455450    }
     
    471466  return es
    472467}
    473 
    474 
    475 type PeelResult struct {
    476   Es *probs.ExprReport
    477 
    478   Nobestpush bool
    479   BestNewMinErr bool
    480  
    481   Bestlen1 int
    482   Bestlen2 int
    483  
    484   Coeff []float64
    485   TestScore int
    486  
    487   Expre expr.Expr
    488   ExpreRe *probs.ExprReport
    489 }
    490 
    491 
    492 func (PS *PgeSearch) SingleStep() []*PeelResult {
    493   loop := 0
    494   eval_cnt := 0
    495   PR := PS.peelRes()
    496  
    497   es := make([]*probs.ExprReport, len(PR))
    498  
    499   for i, elem := range PR {
    500     es[i] = elem.ExpreRe
    501   }
    502  
    503   ex := PS.expandPeeled(es)
    504 
    505   for cnt := range ex {
    506     E := ex[cnt]
    507     if E == nil {
    508       continue
    509     }
    510     for _, e := range E {
    511       if e == nil {
    512         continue
    513       }
    514       if !PS.cnfg.treecfg.CheckExpr(e) {
    515         continue
    516       }
    517       serial := make([]int, 0, 64)
    518       serial = e.Serial(serial)
    519       ins := PS.Trie.InsertSerial(serial)
    520      
    521       if !ins {
    522         continue
    523       }
    524       PS.eval_in <- e
    525       eval_cnt++
    526     }
    527   }
    528   for i := 0; i < eval_cnt; i++ {
    529     re := <-PS.eval_out
    530     if math.IsNaN(re.TestError()) || math.IsInf(re.TestError(), 0) {
    531       continue
    532     }
    533     if re.TestError() < PS.minError {
    534       PS.minError = re.TestError()
    535     }
    536     doIns := true
    537     for _, c := range re.Coeff() {
    538       if math.Abs(c) < PS.cnfg.zeroEpsilon {
    539         doIns = false
    540         break
    541       }
    542     }
    543     if doIns {
    544       re.SetProcID(PS.id)
    545       re.SetIterID(PS.iter)
    546       re.SetUnitID(loop)
    547       re.SetUniqID(PS.neqns)
    548       loop++
    549       PS.neqns++
    550       PS.Queue.Push(re)
    551     }
    552   }
    553   PS.Queue.Sort()
    554 
    555   PS.reportExpr()
    556   PS.iter++
    557  
    558   return PR
    559 }
    560 
    561 func (PS *PgeSearch) peelRes() []*PeelResult {
    562   //es := make([]*probs.ExprReport, PS.cnfg.peelCnt)
    563   PRes := make([]*PeelResult, PS.cnfg.peelCnt)
    564  
    565   for p := 0; p < PS.cnfg.peelCnt && PS.Queue.Len() > 0; p++ {
    566     PR := new(PeelResult)
    567    
    568     PR.BestNewMinErr = false
    569     PR.Nobestpush = false
    570    
    571     e := PS.Queue.Pop().(*probs.ExprReport)
    572    
    573     bPush := true
    574     if len(e.Coeff()) == 1 && math.Abs(e.Coeff()[0]) < PS.cnfg.zeroEpsilon {
    575       //fmt.Println("No Best Push")
    576       PR.Nobestpush = true
    577       p--
    578       continue
    579     }
    580 
    581     if bPush {
    582       //fmt.Printf("pop/push (%d,%d): %v\n", p, PS.Best.Len(), e.Expr())
    583       PR.Bestlen1 = p
    584       PR.Bestlen2 = PS.Best.Len()
    585       PR.Expre = e.Expr()
    586       PR.ExpreRe = e
    587       PS.Best.Push(e)
    588     }
    589 
    590     //es[p] = e
    591     PR.Es = e
    592     PR.Coeff = e.Coeff()
    593     PR.TestScore = e.TestScore()
    594    
    595    
    596     if e.TestScore() > PS.maxScore {
    597       PS.maxScore = e.TestScore()
    598     }
    599     if e.TestError() < PS.minError {
    600       PS.minError = e.TestError()
    601       PR.BestNewMinErr = true
    602       //fmt.Printf("Best New Min Error:  %v\n", e)
    603     }
    604     if e.Size() > PS.maxSize {
    605       PS.maxSize = e.Size()
    606     }
    607    
    608     PRes[p] = PR
    609   }
    610  
    611   return PRes
    612 }
    613 
    614468
    615469func (PS *PgeSearch) expandPeeled(es []*probs.ExprReport) [][]expr.Expr {
     
    633487    // fmt.Println()
    634488  }
     489  fmt.Println("\n")
    635490  return eqns
    636491}
     
    668523
    669524func (PS *PgeSearch) Clean() {
     525  // fmt.Printf("Cleaning PGE\n")
     526
    670527  PS.errLogBuf.Flush()
    671528  PS.mainLogBuf.Flush()
     
    673530  PS.fitnessLogBuf.Flush()
    674531  PS.ipreLogBuf.Flush()
     532
    675533}
    676534
     
    747605  if len(guess) > 0 {
    748606
    749     //fmt.Printf("IMREGEXP %v %v\n", P.SearchType, P.SearchVar)
    750     //fmt.Printf("REGPTrain %T | %#v | %v\n", P.Train, P.Train, P.Train)
    751     //fmt.Printf("eqn %T | %#v | %v\n", eqn, eqn, eqn)
    752     //fmt.Printf("guess %T | %#v | %v\n", guess, guess, guess)
     607    // fmt.Printf("x_dims:  %d  %d\n", x_dim, x_dim2)
    753608
    754609    // Callback version
    755    
    756    
    757610    coeff = levmar.LevmarExpr(eqn, P.SearchVar, P.SearchType, guess, P.Train, P.Test)
    758    
    759611
    760612    // Stack version
     
    789641  R = new(probs.ExprReport)
    790642  R.SetExpr(eqn) /*.ConvertToConstantFs(coeff)*/
    791 
    792643  R.SetCoeff(coeff)
    793644  R.Expr().CalcExprStats()
     
    856707  return
    857708}
    858 
    859 func (PS *PgeSearch) CreateDS(maxGen int, pgeRptEpoch int, pgeRptCount int, pgeArchiveCap int, peelCnt int, evalrCount int, zeroEpsilon float64, initMethod string, growMethod string, sortType int) {
    860   PS.id = 0 //maxGen
    861  
    862   var PC PgeConfig
    863  
    864   PC.pgeRptEpoch = pgeRptEpoch
    865   PC.pgeRptCount = pgeRptCount
    866   PC.pgeArchiveCap = pgeArchiveCap
    867   PC.peelCnt = peelCnt
    868   PC.evalrCount = evalrCount
    869   PC.zeroEpsilon = zeroEpsilon
    870   PC.initMethod = initMethod
    871   PC.growMethod = growMethod
    872 
    873   if sortType == 1 {
    874     PC.sortType = probs.PESORT_PARETO_TRN_ERR
    875   } else { 
    876     PC.sortType = probs.PESORT_PARETO_TST_ERR
    877   }
    878 
    879   PC.maxGen = maxGen
    880   PS.cnfg = PC
    881    
    882   PS.iter = 0
    883 }
    884 
    885 func (PS *PgeSearch) SetProb(ep *probs.ExprProblem) {
    886   PS.prob = ep
    887 }
    888 func (PS *PgeSearch) GetIter() int {
    889   return PS.iter
    890 }
  • branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/go-code/go-pge/problems/benchmarks.go

    r16080 r16231  
    33import (
    44  // "fmt"
    5   expr "github.com/verdverm/go-symexpr"
     5  expr "github.com_del/verdverm/go-symexpr"
    66  "math"
    77  "math/rand"
  • branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/go-code/go-pge/problems/data.go

    r16230 r16231  
    88  "math/rand"
    99  "os"
    10   "C"
    11   "unsafe"
    1210)
    1311
     
    128126}
    129127
    130 func (trainData *PointSet) InitTrainDataF(indepNames []string, depndNames []string, matrix unsafe.Pointer, nEntries int) {
    131   trainData.ReadPointSet("C:/Users/Hansi/Desktop/Data.trn")
    132 }
    133 
    134 func (trainData *PointSet) InitTestDataF(indepNames []string, depndNames []string, matrix unsafe.Pointer, nEntries int) {
    135   trainData.ReadPointSet("C:/Users/Hansi/Desktop/Data.tst")
    136 }
    137 
    138 func (trainData *PointSet) InitTrainData(indepNames []string, depndNames []string, matrix unsafe.Pointer, nEntries int) {
    139   trainData.indepNames = indepNames  //First line in .trn file
    140   trainData.numDim = len(trainData.indepNames)
    141   trainData.depndNames = depndNames //Second line in .trn file
    142  
    143   fmt.Printf("Var Names = %v | %v\n", trainData.depndNames, trainData.indepNames)
    144   var nClum int = len(indepNames) + len(depndNames)
    145 
    146   for i := 0; i < nEntries; i++ {
    147     var pnt Point
    148     for j := 0; j < len(trainData.indepNames); j++ {
    149       elemNr := i * nClum + j
    150       item := (*float64) (unsafe.Pointer( uintptr(unsafe.Pointer(matrix)) + unsafe.Sizeof(float64(0)) * uintptr(elemNr) ))
    151       pnt.indep = append(pnt.indep, *item)
    152      
    153       if os.Getenv("PGEDEBUG") == "1" {
    154         fmt.Printf("Adding independend Test/Train Data (%v,%v): %v\n", i, j, *item)
    155       }
    156     }
    157 
    158     for j := len(trainData.indepNames); j < (len(trainData.indepNames) + len(trainData.depndNames)); j++ {
    159       elemNr := i * nClum + j
    160       item := (*float64) (unsafe.Pointer( uintptr(unsafe.Pointer(matrix)) + unsafe.Sizeof(float64(0)) * uintptr(elemNr) ))
    161       pnt.depnd = append(pnt.depnd, *item )
    162      
    163       if os.Getenv("PGEDEBUG") == "1" {
    164         fmt.Printf("Adding dependend (right side) Test/Train Data (%v, %v): %v\n", i, j, *item)
    165       }
    166     }
    167 
    168     if len(pnt.indep) > 0 {
    169       trainData.dataPoints = append(trainData.dataPoints, pnt)
    170     }
    171   }
    172   fmt.Printf("Num Points: %v\n", len(trainData.dataPoints))
    173  
    174   //if os.Getenv("PGEDEBUG") == "2" {
    175   //  DebugPrint(trainData)
    176   //}
    177 }
    178 
    179 //func (trainData *PointSet) DebugPrint() {
    180 //  for index, elem in range
    181 //}
    182 
    183128func (d *PointSet) ReadPointSet(filename string) {
    184129  ftotal, err := os.OpenFile(filename, os.O_RDONLY, 0)
  • branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/go-code/go-pge/problems/problem.go

    r16183 r16231  
    77  "strings"
    88
    9   expr "github.com/verdverm/go-symexpr"
     9  expr "github.com_del/verdverm/go-symexpr"
    1010)
    1111
     
    166166  return list[0:i]
    167167}
    168 
    169 
    170 func (ep *ExprProblem) CreatePS(Name string, MaxIter int, HitRatio float64, SearchVar int, ProblemTypeString string) {  //IndepNames []string, DepndNames []string, SysNames []string
    171   ep.SearchType = ProblemTypeFromString(ProblemTypeString)
    172   ep.Name = Name
    173  
    174   ep.TrainFns = append(ep.TrainFns, "dummy")
    175   ep.TestFns = append(ep.TestFns, "dummy")
    176    
    177   ep.MaxIter = MaxIter
    178   ep.HitRatio = HitRatio
    179   ep.SearchVar = SearchVar
    180 }
  • branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/go-code/go-pge/problems/report.go

    r16080 r16231  
    44  "container/list"
    55  "fmt"
    6   expr "github.com/verdverm/go-symexpr"
     6  expr "github.com_del/verdverm/go-symexpr"
    77  "sort"
    88)
  • branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/go-code/go-pge/problems/treeparams.go

    r16183 r16231  
    88  "strings"
    99
    10   expr "github.com/verdverm/go-symexpr"
     10  expr "github.com_del/verdverm/go-symexpr"
    1111)
    1212
     
    297297  tp.TmpMinSize, tp.TmpMinDepth = tp.MinSize, tp.MinDepth
    298298}
    299 
    300 
    301 func (TP *TreeParams) CreateTreeParams(Roots string, Nodes string, NonTrig string, Leafs string, UsableVars []int, MaxSize int, MinSize int, MaxDepth int, MinDepth int) {
    302   TP.RootsS = strings.Fields(Roots)
    303   TP.RootsT, TP.Roots = fillExprStuff(TP.RootsS)
    304  
    305   TP.NodesS = strings.Fields(Nodes)
    306   TP.NodesT, TP.Nodes = fillExprStuff(TP.NodesS)
    307  
    308   TP.NonTrigS = strings.Fields(NonTrig)
    309   TP.NonTrigT, TP.NonTrig = fillExprStuff(TP.NonTrigS)
    310  
    311   TP.LeafsS = strings.Fields(Leafs)
    312   TP.LeafsT, TP.Leafs = fillExprStuff(TP.LeafsS)
    313 
    314   TP.UsableVars = UsableVars
    315 
    316   TP.MaxSize = MaxSize
    317   TP.MinSize = MinSize
    318   TP.MaxDepth = MaxDepth
    319   TP.MinDepth = MinDepth
    320 }
Note: See TracChangeset for help on using the changeset viewer.