Removed commented out code

This commit is contained in:
Waldir Leoncio 2020-11-09 15:22:22 +01:00
parent 4fd114f2b2
commit f405cabeb2

View file

@ -565,98 +565,3 @@ indMix <- function(c, npops, dispText) {
list(logml = logml, npops = npops, partitionSummary = partitionSummary)
)
}
# %-----------------------------------------------------------------------
# function [sumcounts, counts, logml] = ...
# initialPopCounts(data, npops, rows, noalle, adjprior)
# nloci=size(data,2);
# counts = zeros(max(noalle),nloci,npops);
# sumcounts = zeros(npops,nloci);
# for i=1:npops
# for j=1:nloci
# i_rivit = rows(i,1):rows(i,2);
# havainnotLokuksessa = find(data(i_rivit,j)>=0);
# sumcounts(i,j) = length(havainnotLokuksessa);
# for k=1:noalle(j)
# alleleCode = k;
# N_ijk = length(find(data(i_rivit,j)==alleleCode));
# counts(k,j,i) = N_ijk;
# end
# end
# end
# logml = laskeLoggis(counts, sumcounts, adjprior);
# %-----------------------------------------------------------------------
# function diffInCounts = computeDiffInCounts(rows, max_noalle, nloci, data)
# % Muodostaa max_noalle*nloci taulukon, jossa on niiden alleelien
# % lukum<75><6D>r<EFBFBD>t (vastaavasti kuin COUNTS:issa), jotka ovat data:n
# % riveill<6C> rows. rows pit<69><74> olla vaakavektori.
# diffInCounts = zeros(max_noalle, nloci);
# for i=rows
# row = data(i,:);
# notEmpty = find(row>=0);
# if length(notEmpty)>0
# diffInCounts(row(notEmpty) + (notEmpty-1)*max_noalle) = ...
# diffInCounts(row(notEmpty) + (notEmpty-1)*max_noalle) + 1;
# end
# end
# %---------------------------------------------------------
# function T = cluster_own(Z,nclust)
# true=logical(1);
# false=logical(0);
# maxclust = nclust;
# % Start of algorithm
# m = size(Z,1)+1;
# T = zeros(m,1);
# % maximum number of clusters based on inconsistency
# if m <= maxclust
# T = (1:m)';
# elseif maxclust==1
# T = ones(m,1);
# else
# clsnum = 1;
# for k = (m-maxclust+1):(m-1)
# i = Z(k,1); % left tree
# if i <= m % original node, no leafs
# T(i) = clsnum;
# clsnum = clsnum + 1;
# elseif i < (2*m-maxclust+1) % created before cutoff, search down the tree
# T = clusternum(Z, T, i-m, clsnum);
# clsnum = clsnum + 1;
# end
# i = Z(k,2); % right tree
# if i <= m % original node, no leafs
# T(i) = clsnum;
# clsnum = clsnum + 1;
# elseif i < (2*m-maxclust+1) % created before cutoff, search down the tree
# T = clusternum(Z, T, i-m, clsnum);
# clsnum = clsnum + 1;
# end
# end
# end
# function T = clusternum(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;
# end