一.为什么 连孔加除毛刺孔

原因是 PCB板材中含有玻璃纤维, 毛刺产生位置在于2个孔相交位置,由于此处钻刀受力不均导致纤维切削不断形成毛刺 ,为了解决这个问题:在钻完2个连孔后,在相交处再钻一个孔,并钻进去一点(常规进去1-2mil),这样就可以将纤维毛刺去除 (没找到SLOT槽与SLOT槽的实物图.就用SLOT槽与圆孔吧,产生毛刺效果也是一样的)

PCB同行业毛刺问题处理办法 钻孔孔内毛刺问题分析改善报告

二.如何判断除毛刺孔加多少个?

在PCB行业工程加除毛刺孔加多少个也没有太明确的定义,只要满足毛刺去除即可.

这里我们把相交的SLOT槽分为2类,一类是十字形,另一类是T型,分别用实际的案例做以说明.

1.十字型交叉SLOT槽:

实例1:十字槽 加1个孔 需满足2点需求
           P1到P3 两点距离 与 P2与P4 两点距离相等
           P1与P2 两点距离 与 P2与P3两点距离相差<0.5mm

实例2:十字槽 加2个孔或4个孔, 需满足1点需求
          P1到P3 两点距离 与 P2与P4 两点距离相等

实例3:十字槽 加3个孔或4个孔,不满足以下条件时
          P1到P3 两点距离 与 P2与P4 两点距离相等
          P1与P2 两点距离 与 P2与P3两点距离相差<0.5mm

失效实例:十字槽钻1个孔失效案例

2.T字型交叉SLOT槽:

实例1: T字槽 加1个孔, 需满足以下条件时
         (W1 * 0.5 + W1 * 0.707) < W2

实例2:T字槽 加2个孔, 不满足以下条件时
           (W1 * 0.5 + W1 * 0.707) < W2

三.连孔加除毛刺孔实现关键需求出参数

除毛刺孔,这里列举几个关键参数,如下图所示(因为求解的参数太多,画图不好呈现,具体请看下方的代码)

1.T字型槽加1个孔

2.T字型槽加2个孔

3.十字型槽加孔和T字型加孔类型,具体看下方代码

四.C#简易代码实现:

1.加除毛刺孔代码

           #region 加除毛刺孔  mcdrl
gLayer glayer = g.getFEATURES($"{"drl"}", g.STEP, g.JOB, "mm", true);
gL line1 = glayer.Llist[];
gL line2 = glayer.Llist[];
List<gP> gpList = calc2.l2l_IntersectHole(line1, line2, 0.05);
addCOM.pad(gpList);
#endregion

2.计算函数

    /// <summary>
/// 线段与线段(2个SLOT槽相交) 加除毛刺孔
/// </summary>
/// <param name="l1"></param>
/// <param name="l2"></param>
/// <param name="CutInner">切入值</param>
/// <returns></returns>
public List<gP> l2l_IntersectHole(gL l1, gL l2, double CutInner = 0.05)
{
add addCOM = new add();
List<gP> gpList = new List<gP>();
gL l1_L, l1_R, l2_L, l2_R;
int jd1Type = , jd2Type = , jd3Type = , jd4Type = ;
gPoint jdP1, jdP2, jdP3, jdP4;
double ang1, ang2, ang3, ang4;
gPoint HoleP1, HoleP2, HoleP3, HoleP4;
if (multi(l1.ps, l1.pe, l2.ps) < && multi(l1.ps, l1.pe, l2.pe) > )
{
gL tempL = l1;
l1 = l2;
l2 = tempL;
}
double l1Rval = l1.width * 0.0005;
double l2Rval = l2.width * 0.0005;
double Rval = l1Rval > l2Rval ? l2Rval : l1Rval;
double Hole_Radius = Rval;
double HoleSize = Hole_Radius * ;
l_offset(l1, l1Rval, out l1_L, out l1_R);
l_offset(l2, l2Rval, out l2_L, out l2_R);
jdP1 = l2l_Intersect(l1_L, l2_R, ref jd1Type);
jdP2 = l2l_Intersect(l1_L, l2_L, ref jd2Type);
jdP3 = l2l_Intersect(l1_R, l2_L, ref jd3Type);
jdP4 = l2l_Intersect(l1_R, l2_R, ref jd4Type);
jd1Type = jd1Type < ? : jd1Type;
jd2Type = jd2Type < ? : jd2Type;
jd3Type = jd3Type < ? : jd3Type;
jd4Type = jd4Type < ? : jd4Type;
if ((jd1Type + jd2Type + jd3Type + jd4Type) == ) //产生4个交点
{
if (Math.Abs(p2p_di(jdP1, jdP3) - p2p_di(jdP2, jdP4)) < 0.01) //4个交点且交错交点相等时 加1个孔
{
if (Math.Abs(p2p_di(jdP1, jdP2) - p2p_di(jdP2, jdP3)) < 0.51) //4个交点且2条槽宽相差小于0.5mm 加1个孔
{
gPoint PointCenter = p2p_centerP(jdP1, jdP3);
Hole_Radius = p2p_di(PointCenter, jdP1) + CutInner;
HoleSize = ((int)(Math.Ceiling((Hole_Radius * * ) / )) * ) * 0.001; ;
gpList.Add(new gP(PointCenter, HoleSize * ));
return gpList;
}
}
}
if ((jd1Type + jd2Type + jd3Type + jd4Type) == ) //产生2个交点
{
//P2 P3
//P1 P4
gPoint LineCenter = new gPoint();
double AngDirdction = ;
double ValDirdction = ;
double ValR = ;
double Lwidth = ;
if (jd1Type + jd2Type == )
{
LineCenter = p2p_centerP(jdP1, jdP2);
AngDirdction = p_ang(LineCenter, l1_R);
ValDirdction = p2p_di(jdP1, jdP2) * 0.5;
ValR = ValDirdction * 1.4142136;
Lwidth = l1Rval * ;
}
if (jd2Type + jd3Type == )
{
LineCenter = p2p_centerP(jdP2, jdP3);
AngDirdction = p_ang(LineCenter, l2_R);
ValDirdction = p2p_di(jdP2, jdP3) * 0.5;
ValR = ValDirdction * 1.4142136;
Lwidth = l2Rval * ;
}
if (jd3Type + jd4Type == )
{
LineCenter = p2p_centerP(jdP3, jdP4);
AngDirdction = p_ang(LineCenter, l1_L);
ValDirdction = p2p_di(jdP3, jdP4) * 0.5;
ValR = ValDirdction * 1.4142136;
Lwidth = l1Rval * ;
}
if (jd4Type + jd1Type == )
{
LineCenter = p2p_centerP(jdP4, jdP1);
AngDirdction = p_ang(LineCenter, l2_L);
ValDirdction = p2p_di(jdP4, jdP1) * 0.5;
ValR = ValDirdction * 1.4142136;
Lwidth = l2Rval * ;
}
Hole_Radius = ValR + CutInner;
HoleSize = ((int)(Math.Ceiling((Hole_Radius * * ) / )) * ) * 0.001;
Hole_Radius = HoleSize * 0.5;
double diffVal = Hole_Radius - (ValR + CutInner);
if (diffVal > )
{
ValDirdction = Math.Sqrt(Math.Pow((ValR + diffVal), ) - Math.Pow((ValDirdction), ));
}
if ((ValDirdction + Hole_Radius - 0.1) < Lwidth) //2个交点且正交时 加1个孔
{ gPoint PointCenter = p_val_ang(LineCenter, ValDirdction, AngDirdction);
gpList.Add(new gP(PointCenter, HoleSize * ));
return gpList;
}
} //当不满足条件的,全按一个交点加一个孔的方式处理
HoleSize = ((int)(Math.Ceiling((Rval * * ) / )) * ) * 0.001;
Hole_Radius = HoleSize * 0.5;
ang1 = a_AngleCenter_dirdction(jdP2, jdP1, jdP4);
ang2 = a_AngleCenter_dirdction(jdP3, jdP2, jdP1);
ang3 = p_ang_invert(ang1);
ang4 = p_ang_invert(ang2);
HoleP1 = p_val_ang(jdP1, Hole_Radius - CutInner, ang1);
HoleP2 = p_val_ang(jdP2, Hole_Radius - CutInner, ang2);
HoleP3 = p_val_ang(jdP3, Hole_Radius - CutInner, ang3);
HoleP4 = p_val_ang(jdP4, Hole_Radius - CutInner, ang4);
if (jd1Type == )
gpList.Add(new gP(HoleP1, HoleSize * ));
if (jd2Type == )
gpList.Add(new gP(HoleP2, HoleSize * ));
if (jd3Type == )
gpList.Add(new gP(HoleP3, HoleSize * ));
if (jd4Type == )
gpList.Add(new gP(HoleP4, HoleSize * ));
return gpList;
}
/// <summary>
/// 线Line偏移 out 左与右偏移线Line
/// </summary>
/// <param name="l"></param>
/// <param name="offset_val">偏移数值</param>
/// <param name="left_l">out 左偏移线L</param>
/// <param name="rithg_l">out 右偏移线L</param>
public void l_offset(gL l, double offset_val, out gL left_l, out gL rithg_l)
{
left_l = l;
rithg_l = l;
double angle_ = p_ang(l.ps, l.pe);
left_l.ps = p_val_ang(l.ps, offset_val, angle_ + );
left_l.pe = p_val_ang(l.pe, offset_val, angle_ + );
rithg_l.ps = p_val_ang(l.ps, offset_val, angle_ - );
rithg_l.pe = p_val_ang(l.pe, offset_val, angle_ - );
}
/// <summary>
/// 求方位角
/// </summary>
/// <param name="ps"></param>
/// <param name="pe"></param>
/// <returns></returns>
public double p_ang(gPoint ps, gPoint pe)
{
double a_ang = Math.Atan((pe.y - ps.y) / (pe.x - ps.x)) / Math.PI * ;
//象限角 转方位角 计算所属象限 并求得方位角
if (pe.x >= ps.x && pe.y >= ps.y) //↗ 第一象限
{
return a_ang;
}
else if (!(pe.x >= ps.x) && pe.y >= ps.y) // ↖ 第二象限
{
return a_ang + ;
}
else if (!(pe.x >= ps.x) && !(pe.y >= ps.y)) //↙ 第三象限
{
return a_ang + ;
}
else if (pe.x >= ps.x && !(pe.y >= ps.y)) // ↘ 第四象限
{
return a_ang + ;
}
else
{
return a_ang;
}
}//求方位角
/// <summary>
/// 求增量坐标
/// </summary>
/// <param name="ps">起点</param>
/// <param name="val">增量值</param>
/// <param name="ang_direction">角度</param>
/// <returns></returns>
public gPoint p_val_ang(gPoint ps, double val, double ang_direction)
{
gPoint pe;
pe.x = ps.x + val * Math.Cos(ang_direction * Math.PI / );
pe.y = ps.y + val * Math.Sin(ang_direction * Math.PI / );
return pe;
}
/// <summary>
/// 求线段与线段相交点 (线段与线段相差微小距离误差无法可控 之前测试有发现后来没发现了,有待验证)
/// </summary>
/// <param name="L1"></param>
/// <param name="L2"></param>
/// <param name="isIntersectType">0平行无交点 1本身相交 -1本身不相交(但延长相交)</param>
/// <returns></returns>
public gPoint l2l_Intersect(gL L1, gL L2, ref int isIntersectType)
{
return l2l_Intersect(L1.ps, L1.pe, L2.ps, L2.pe, ref isIntersectType);
}
/// <summary>
/// 求线段与线段相交点 (线段与线段相差微小距离误差无法可控 之前测试有发现后来没发现了,有待验证)
/// </summary>
/// <param name="l1ps"></param>
/// <param name="l1pe"></param>
/// <param name="l2ps"></param>
/// <param name="l2pe"></param>
/// <param name="isIntersectType">0平行无交点 1本身相交 -1本身不相交(但延长相交)</param>
/// <returns></returns>
public gPoint l2l_Intersect(gPoint l1ps, gPoint l1pe, gPoint l2ps, gPoint l2pe, ref int isIntersectType)
{
gL L1 = new gL(l1ps, l1pe, );
gL L2 = new gL(l2ps, l2pe, );
gPoint tempP = new gPoint();
double ABC, ABD, CDA, CDB, T;
//面积符号相同则两点在线段同侧,不相交 (对点在线段上的情况,本例当作不相交处理)
ABC = (L1.ps.x - L2.ps.x) * (L1.pe.y - L2.ps.y) - (L1.ps.y - L2.ps.y) * (L1.pe.x - L2.ps.x);
ABD = (L1.ps.x - L2.pe.x) * (L1.pe.y - L2.pe.y) - (L1.ps.y - L2.pe.y) * (L1.pe.x - L2.pe.x);
CDA = (L2.ps.x - L1.ps.x) * (L2.pe.y - L1.ps.y) - (L2.ps.y - L1.ps.y) * (L2.pe.x - L1.ps.x); // 三角形cda 面积的2倍 // 注意: 这里有一个小优化.不需要再用公式计算面积,而是通过已知的三个面积加减得出.
CDB = CDA + ABC - ABD; // 三角形cdb 面积的2倍
if (Math.Abs(ABC - ABD) <= 0.000001)
{
isIntersectType = ; //平行
return tempP;
}
else
{
if ((CDA * CDB <= 0.000001) && (ABC * ABD <= 0.000001)) //本身相交
{
isIntersectType = ;
}
else
{
isIntersectType = -; //延长相交
}
} //计算交点
T = CDA / (ABD - ABC);
tempP.x = L1.ps.x + T * (L1.pe.x - L1.ps.x);
tempP.y = L1.ps.y + T * (L1.pe.y - L1.ps.y);
return tempP;
}
/// <summary>
/// 返回两点之间欧氏距离
/// </summary>
/// <param name="p1"></param>
/// <param name="p2"></param>
/// <returns></returns>
public double p2p_di(gPoint p1, gPoint p2)
{
return Math.Sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y));
}
/// <summary>
/// 求点到点 中心点P
/// </summary>
/// <param name="l"></param>
/// <returns></returns>
public gPoint p2p_centerP(gPoint p1, gPoint p2)
{
gPoint tempP;
tempP.x = (p1.x + p2.x) * 0.5;
tempP.y = (p1.y + p2.y) * 0.5;
return tempP;
}
/// <summary>
/// 求增量坐标
/// </summary>
/// <param name="ps">起点</param>
/// <param name="val">增量值</param>
/// <param name="ang_direction">角度</param>
/// <returns></returns>
public gPoint p_val_ang(gPoint ps, double val, double ang_direction)
{
gPoint pe;
pe.x = ps.x + val * Math.Cos(ang_direction * Math.PI / );
pe.y = ps.y + val * Math.Sin(ang_direction * Math.PI / );
return pe;
}
/// <summary>
/// 求弧Arc 弧中心方位角
/// </summary>
/// <param name="ps"></param>
/// <param name="pc"></param>
/// <param name="pe"></param>
/// <param name="ccw"></param>
/// <returns></returns>
public double a_AngleCenter_dirdction(gPoint ps, gPoint pc, gPoint pe, bool ccw = false)
{
double angle_s, angle_e, angle_sum, center_dirdction;
if (ccw)
{
angle_s = p_ang(pc, pe);
angle_e = p_ang(pc, ps);
}
else
{
angle_s = p_ang(pc, ps);
angle_e = p_ang(pc, pe);
}
if (angle_s == ) { angle_s = ; }
if (angle_e >= angle_s)
{
angle_sum = - (angle_e - angle_s);
center_dirdction = (angle_s + angle_e) * 0.5 + ;
}
else
{
angle_sum = angle_s - angle_e;
center_dirdction = (angle_s + angle_e) * 0.5;
}
if (center_dirdction > ) { center_dirdction = center_dirdction - ; }
return center_dirdction;
}
/// <summary>
/// 求反方位角
/// </summary>
/// <param name="ang_direction"></param>
/// <returns></returns>
public double p_ang_invert(double ang_direction)//求反方位角
{
if (ang_direction >= )
return ang_direction - ;
else
return ang_direction + ;
}

3.Point,PAD;Line;Arc数据结构

    /// <summary>
/// Line 数据类型
/// </summary>
public struct gL
{
public gL(double ps_x, double ps_y, double pe_x, double pe_y, double width_)
{
this.ps = new gPoint(ps_x, ps_y);
this.pe = new gPoint(pe_x, pe_y);
this.negative = false;
this.symbols = "r";
this.attribut = string.Empty;
this.width = width_;
}
public gL(gPoint ps_, gPoint pe_, double width_)
{
this.ps = ps_;
this.pe = pe_;
this.negative = false;
this.symbols = "r";
this.attribut = string.Empty;
this.width = width_;
}
public gL(gPoint ps_, gPoint pe_, string symbols_, double width_)
{
this.ps = ps_;
this.pe = pe_;
this.negative = false;
this.symbols = symbols_;
this.attribut = string.Empty;
this.width = width_;
}
public gPoint ps;
public gPoint pe;
public bool negative;//polarity-- positive negative
public string symbols;
public string attribut;
public double width;
public static gL operator +(gL l1, gPoint move_p)
{
l1.ps += move_p;
l1.pe += move_p;
return l1;
}
public static gL operator +(gL l1, gP move_p)
{
l1.ps += move_p.p;
l1.pe += move_p.p;
return l1;
}
public static gL operator -(gL l1, gPoint move_p)
{
l1.ps -= move_p;
l1.pe -= move_p;
return l1;
}
public static gL operator -(gL l1, gP move_p)
{
l1.ps -= move_p.p;
l1.pe -= move_p.p;
return l1;
}
}
/// <summary>
/// ARC 数据类型
/// </summary>
public struct gA
{
public gA(double ps_x, double ps_y, double pc_x, double pc_y, double pe_x, double pe_y, double width_, bool ccw_)
{
this.ps = new gPoint(ps_x, ps_y);
this.pc = new gPoint(pc_x, pc_y);
this.pe = new gPoint(pe_x, pe_y);
this.negative = false;
this.ccw = ccw_;
this.symbols = "r";
this.attribut = string.Empty;
this.width = width_;
}
public gA(gPoint ps_, gPoint pc_, gPoint pe_, double width_, bool ccw_ = false)
{
this.ps = ps_;
this.pc = pc_;
this.pe = pe_;
this.negative = false;
this.ccw = ccw_;
this.symbols = "r";
this.attribut = string.Empty;
this.width = width_;
}
public gPoint ps;
public gPoint pe;
public gPoint pc;
public bool negative;//polarity-- positive negative
public bool ccw; //direction-- cw ccw
public string symbols;
public string attribut;
public double width;
public static gA operator +(gA arc1, gPoint move_p)
{
arc1.ps += move_p;
arc1.pe += move_p;
arc1.pc += move_p;
return arc1;
}
public static gA operator +(gA arc1, gP move_p)
{
arc1.ps += move_p.p;
arc1.pe += move_p.p;
arc1.pc += move_p.p;
return arc1;
}
public static gA operator -(gA arc1, gPoint move_p)
{
arc1.ps -= move_p;
arc1.pe -= move_p;
arc1.pc -= move_p;
return arc1;
}
public static gA operator -(gA arc1, gP move_p)
{
arc1.ps -= move_p.p;
arc1.pe -= move_p.p;
arc1.pc -= move_p.p;
return arc1;
}
}
/// <summary>
/// PAD 数据类型
/// </summary>
public struct gP
{
public gP(double x_val, double y_val, double width_)
{
this.p = new gPoint(x_val, y_val);
this.negative = false;
this.angle = ;
this.mirror = false;
this.symbols = "r";
this.attribut = string.Empty;
this.width = width_;
}
public gPoint p;
public bool negative;//polarity-- positive negative
public double angle;
public bool mirror;
public string symbols;
public string attribut;
public double width;
public static gP operator +(gP p1, gP p2)
{
p1.p += p2.p;
return p1;
}
public static gP operator -(gP p1, gP p2)
{
p1.p -= p2.p;
return p1;
}
}
/// <summary>
/// 点 数据类型 (XY)
/// </summary>
public struct gPoint
{
public gPoint(gPoint p_)
{
this.x = p_.x;
this.y = p_.y;
}
public gPoint(double x_val, double y_val)
{
this.x = x_val;
this.y = y_val;
}
public double x;
public double y;
public static gPoint operator +(gPoint p1, gPoint p2)
{
p1.x += p2.x;
p1.y += p2.y;
return p1;
}
public static gPoint operator -(gPoint p1, gPoint p2)
{
p1.x -= p2.x;
p1.y -= p2.y;
return p1;
}
}

五.在Genesis或Incam中如何判断是否为连孔

判断2个孔是否为连孔,可以自己写算法实现啦,当然更多人还是会选择奥宝提供DrillChecklist分析出来的的结果来判断是否为连孔.因为你自己写的算法效率没有奥宝的效率高呀

六.实现效果

PCB genesis连孔加除毛刺孔(槽孔与槽孔)实现方法(三)的更多相关文章

  1. PCB genesis连孔加除毛刺孔(圆孔与槽孔)实现方法(二)

    一.为什么 连孔加除毛刺孔 原因是 PCB板材中含有玻璃纤维, 毛刺产生位置在于2个孔相交位置,由于此处钻刀受力不均导致纤维切削不断形成毛刺 ,为了解决这个问题:在钻完2个连孔后,在相交处再钻一个孔, ...

  2. PCB genesis连孔加除毛刺孔(圆孔与圆孔)实现方法(一)

    一.为什么 连孔加除毛刺孔 原因是 PCB板材中含有玻璃纤维, 毛刺产生位置在于2个孔相交位置,由于此处钻刀受力不均导致纤维切削不断形成毛刺 ,为了解决这个问题:在钻完2个连孔后,在相交处再钻一个孔, ...

  3. PCB genesis大孔加小孔(即卸力孔)实现方法

    一.为什么 大孔中要加小孔(即卸力孔) 这其实跟钻刀的排屑有关了,当钻刀越大孔,排屑量也越大(当然这也得跟转速,下刀速的参数有关系),通常当钻刀越大,转速越慢,下刀速也越慢(因为要保证它的排屑通畅). ...

  4. PCB genesis自制孔点 Font字体实现方法

    一.先看genesis原有Font字体 在PCB工程CAM加孔点字体要求时,通常我们直接用Geneis软件给我们提供了2种孔点字体canned_57与canned_67,但此字体可能不能满足各个工厂个 ...

  5. PCB genesis短槽加引导孔实现方法

    一.何为短槽 短槽通常定义:槽长小于2倍槽宽      如:槽长1.8mm,槽宽1.0mm 二.为什么要加短槽加引孔呢 短槽孔在钻孔时孔易偏斜导致槽长偏短, 当槽长宽比越小,则受力越不均匀,在钻第2个 ...

  6. PCB genesis 大孔扩孔(不用G84命令)实现方法

    PCB钻孔时,当钻刀>6.3mm时,超出钻孔范围,钻孔工序是没有这么大的钻刀,当这种情况,工程CAM会都采用G84命令用小孔扩孔的方式制作, 在这里介绍一种如果不用G84命令,用程序实现将大孔生 ...

  7. PCB genesis孔符制作实现方法

    一.先看genesis原始孔符 孔符的作用:用于表示孔径的大小的一种代号, 当孔径检测时,可以按分孔图中的孔符对应的孔径尺寸对孔径检测. 在实际PCB行业通常不使用原始(图形)孔符,而使用字母孔符(如 ...

  8. PCB Genesis SET拼板(圆形板拼板) 实现效果(二)

    越来发现Genesis采用Surface多边形数据结构的重要性了,当撑握了多边形缩放,交集, 差集,并集等算法, 想实现PCB拼板简直轻而易举了;当然借助多边形算法可以开发出更多的PCB实用的工具出来 ...

  9. PCB genesis Slot槽转钻孔(不用G85命令)实现方法

    PCB钻Slot槽一般都采用G85命令钻槽孔,而采用G85命令工程CAM无法准确的知道Slot槽钻多少个孔,并不能决定钻槽孔的顺序,因为采用G85命令钻孔密度与钻槽顺序由钻机本身决定的.在这里介绍一种 ...

随机推荐

  1. jquery的delegate()方法

    delegate() 方法为指定的元素(属于被选元素的子元素)添加一个或多个事件处理程序,并规定当这些事件发生时运行的函数. 使用 delegate() 方法的事件处理程序适用于当前或未来的元素(比如 ...

  2. linux shell脚本学习笔记一

    一.文件比较运算符-e filename 如果 filename存在,则为真 [ -e /var/log/syslog ]-d filename 如果 filename为目录,则为真 [ -d /tm ...

  3. (2) GoJS Node简介

    node GoJS提供了非常简单的创建Node节点的方法,可将文本内容.结点形状.背景颜色.边距等属性通过数据绑定[go.Binding]直接绑定到对应的Node数据中. 本文简单介绍Node的创建过 ...

  4. 浅谈AC自动机模板

    什么是AC自动机? 百度百科 Aho-Corasick automaton,该算法在1975年产生于贝尔实验室,是著名的多模匹配算法. 要学会AC自动机,我们必须知道什么是Trie,也就是字典树.Tr ...

  5. java一维数组的声明、初始化及排序

    public class TestArray { public static void main(String[] args) { /** 数组声明及动态初始化 int a[] = new int[a ...

  6. buf.writeInt8()函数详解

    buf.writeInt8(value, offset[, noAssert]) value {Number} 需要被写入到 Buffer 的字节 offset {Number} 0 <= of ...

  7. ganglia371 on suse11sp3

    参考https://my.oschina.net/duangr/blog/181585 1.确认依赖包是否已安装 确认命令:rpm -qa  如下为适合suse11sp3的依赖包版本 apr: lib ...

  8. Set Map List Iterator

    Set和Map类似,也是一组key的集合,但不存储value.由于key不能重复,所以,在Set中,没有重复的key. Map放没有顺序的键值对,所有键值对 — 参见 entrySet(),所有键 — ...

  9. Leetcode 131.分割回文串

    分割回文串 给定一个字符串 s,将 s 分割成一些子串,使每个子串都是回文串. 返回 s 所有可能的分割方案. 示例: 输入: "aab" 输出: [ ["aa" ...

  10. POJ 2356 && POJ 3370 鸽巢原理

    POJ 2356: 题目大意: 给定n个数,希望在这n个数中找到一些数的和是n的倍数,输出任意一种数的序列,找不到则输出0 这里首先要确定这道题的解是必然存在的 利用一个 sum[i]保存前 i 个数 ...