R: cosmetics + start translation of (selmix.m into) main.R
[valse.git] / R / suppressionmodelesegaux.R
index a558efb..a588062 100644 (file)
@@ -1,18 +1,20 @@
-suppressionmodelesegaux = function(B1,B2,glambda,rho,pi){
-  ind = c()
-  for(j in 1:length(glambda)){
-    for(ll in 1:(l-1)){
-      if(B1[,,l] == B1[,,ll]){
-        ind = c(ind, l)
-      }
-    }
-  }
-  ind = unique(ind)
-  B1 = B1[,,-ind]
-  glambda = glambda[-ind]
-  B2 = B2[,,-ind]
-  rho = rho[,,,-ind] 
-  pi = pi[,-ind]
-  
-  return(list(B1,B2,glambda,ind,rho,pi))
-}
\ No newline at end of file
+suppressionmodelesegaux = function(B1,B2,glambda,rho,pi)
+{
+       ind = c()
+       for (j in 1:length(glambda))
+       {
+               for (ll in 1:(l-1))
+               {
+                       if(B1[,,l] == B1[,,ll])
+                               ind = c(ind, l)
+               }
+       }
+       ind = unique(ind)
+       B1 = B1[,,-ind]
+       glambda = glambda[-ind]
+       B2 = B2[,,-ind]
+       rho = rho[,,,-ind] 
+       pi = pi[,-ind]
+
+       return (list(B1=B1,B2=B2,glambda=glambda,ind=ind,rho=rho,pi=pi))
+}