Fixed syntax
This commit is contained in:
parent
637df694bb
commit
74e11205b7
1 changed files with 7 additions and 7 deletions
|
|
@ -1,4 +1,4 @@
|
|||
addToSummary <- funciton(logml, partitionSummary, worstIndex) {
|
||||
addToSummary <- function(logml, partitionSummary, worstIndex) {
|
||||
# Tiedet<65><74>n, ett<74> annettu logml on isompi kuin huonoin arvo
|
||||
# partitionSummary taulukossa. Jos partitionSummary:ss<73> ei viel<65> ole
|
||||
# annettua logml arvoa, niin lis<69>t<EFBFBD><74>n worstIndex:in kohtaan uusi logml ja
|
||||
|
|
@ -6,13 +6,13 @@ addToSummary <- funciton(logml, partitionSummary, worstIndex) {
|
|||
|
||||
apu <- find(abs(partitionSummary[, 2] - logml) < 1e-5)
|
||||
if (isempty(apu)) {
|
||||
# Nyt l<>ydetty partitio ei ole viel<65> kirjattuna summaryyn.
|
||||
npops <- length(unique(PARTITION))
|
||||
partitionSummary[worstIndex, 1] <- npops
|
||||
partitionSummary[worstIndex, 2] <- logml
|
||||
added <- 1
|
||||
# Nyt l<>ydetty partitio ei ole viel<65> kirjattuna summaryyn.
|
||||
npops <- length(unique(PARTITION))
|
||||
partitionSummary[worstIndex, 1] <- npops
|
||||
partitionSummary[worstIndex, 2] <- logml
|
||||
added <- 1
|
||||
} else {
|
||||
added <- 0
|
||||
added <- 0
|
||||
}
|
||||
return(list(partitionSummary = partitionSummary, added = added))
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue