summaryrefslogtreecommitdiff
path: root/report/pyp_clustering/acl09-short/code/crppred_geom.m
diff options
context:
space:
mode:
Diffstat (limited to 'report/pyp_clustering/acl09-short/code/crppred_geom.m')
-rw-r--r--report/pyp_clustering/acl09-short/code/crppred_geom.m12
1 files changed, 12 insertions, 0 deletions
diff --git a/report/pyp_clustering/acl09-short/code/crppred_geom.m b/report/pyp_clustering/acl09-short/code/crppred_geom.m
new file mode 100644
index 00000000..e6869e4f
--- /dev/null
+++ b/report/pyp_clustering/acl09-short/code/crppred_geom.m
@@ -0,0 +1,12 @@
+function output = crppred_geom(input,lengths,b)
+
+
+output = zeros(length(input),1);
+
+p0=(1/52).^lengths;
+a=b*p0;
+for i = 1:length(input)
+ output(i) = a(i)*sum(1./((1:input(i))+a(i)-1));
+end
+
+