1 文本格式
using System;
using System.Collections.Generic;
namespace Legalsoft.Truffer
{
public class Phylo_clc : Phylagglom
{
public override void premin(double[,] d, int[] nextp)
{
}
public override double dminfn(double[,] d, int i, int j)
{
return d[i, j];
}
public override double dbranchfn(double[,] d, int i, int j)
{
return 0.5 * d[i, j];
}
public override double dnewfn(double[,] d, int k, int i, int j, int ni, int nj)
{
return Math.Max(d[i, k], d[j, k]);
}
public override void drootbranchfn(double[,] d, int i, int j, int ni, int nj, ref double bi, ref double bj)
{
bi = bj = 0.5 * d[i, j];
}
public Phylo_clc(double[,] dist) : base(dist)
{
makethetree(dist);
}
}
}
2 代码格式
cs
using System;
using System.Collections.Generic;
namespace Legalsoft.Truffer
{
public class Phylo_clc : Phylagglom
{
public override void premin(double[,] d, int[] nextp)
{
}
public override double dminfn(double[,] d, int i, int j)
{
return d[i, j];
}
public override double dbranchfn(double[,] d, int i, int j)
{
return 0.5 * d[i, j];
}
public override double dnewfn(double[,] d, int k, int i, int j, int ni, int nj)
{
return Math.Max(d[i, k], d[j, k]);
}
public override void drootbranchfn(double[,] d, int i, int j, int ni, int nj, ref double bi, ref double bj)
{
bi = bj = 0.5 * d[i, j];
}
public Phylo_clc(double[,] dist) : base(dist)
{
makethetree(dist);
}
}
}