//node class node
Public class node
{
Public int id;//record id number
Public PointF pos_;
Public List
}
//arc arc
Public class arc
{
Public arc ()
{
P_list_=new List
}
Public arc (double x, double y)
{
PointF pot=new PointF ();
Pot. X=the Convert. ToSingle (X);
Pot. Y=the Convert. ToSingle (Y);
P_list_=new List
P_list_. Add (pot);
}
Public arc (PointF p)
{
P_list_=new List
P_list_. Add (p);
}
Public arc (List
{
P_list_=p_list;
}
Public List
//store left polygon, right polygon, id, number of points, the start node and end node number
Public int left_polygon right_polygon, id, count, from_node, to_node;
}
//polygon polygon
Public class polygon
{
Public List
Public List
Public List
//record polygon id and outsourcing rectangular border
Public int id, x_max x_min y_max, y_min;
}
//topology structure topology
Public class topology
{
Public topology ()
{
List
Nodes_. Add (new node ());//test line, even if this line, after the new topology is still null, nodes_ List still can't add elements such as
List
List
Polygon outer_polygon=new polygon ();
}
Public List
Public List
Public List
Public polygon outer_polygon;//the polygon
}
In the topology a_topology=new topology (); After the break point, a_topology still is null, can not add elements in the List members, is this why?
CodePudding user response:
But shall not apply to the constructor, directly behind the members defined initialization canCodePudding user response:
Understand, their mentally disabled