Removed duplicated function
This commit is contained in:
parent
4520fd30fb
commit
c975a7c820
1 changed files with 0 additions and 16 deletions
|
|
@ -33,19 +33,3 @@ cluster_own <- function(Z, nclust) {
|
||||||
}
|
}
|
||||||
return(T)
|
return(T)
|
||||||
}
|
}
|
||||||
|
|
||||||
clusternum <- function(X, T, k, c) {
|
|
||||||
m <- size(X, 1) + 1
|
|
||||||
while (!isempty(k)) {
|
|
||||||
# Get the children of nodes at this level
|
|
||||||
children <- X[k, 1:2]
|
|
||||||
children <- children
|
|
||||||
|
|
||||||
# Assign this node number to leaf children
|
|
||||||
t <- (children <= m)
|
|
||||||
T[children[t]] <- c
|
|
||||||
# Move to next level
|
|
||||||
k <- children(!t) - m
|
|
||||||
}
|
|
||||||
return(T)
|
|
||||||
}
|
|
||||||
Loading…
Add table
Reference in a new issue