-
The principle of the cross chain is very simple. The implementation is also relatively simple. i,here, give you the defination of the you can build a cross_linklist by yourself or you can take a look at what the above writing.
Define a header node data type, and define an array when implementing.
typedef struct node{
int vex;Vertex.
struct *node *first;Point to the first node that is associated with it.
listnode;
Then define the type of a node, typedef struct node{
int vexnum;The vertex number.
int vexdata;Vertex data.
struct *node *next;Refers to other nodes that are associated with the header node.
node;The addition of matrices is the addition of the corresponding terms, so you only need to add the corresponding terms of the two matrices represented by the cross chain. Specifically, for each vertex, look in the header table, and then find the nodes that are associated with it. The pointer is moved back to compare whether there are two identical nodes in the two cross-linked lists, and if so, they are added to save the result to one of the cross-linked lists.
Otherwise, it doesn't change. Find the other vertices in turn. You can get the results.
listnode head1,head2;
node *p,*q;
p=head1->frist;
q=head2->first;
while(!p)
while(!q)
if(p->vexnum==q->vexnum)
p->vexdata+=q->vexdata;//put the result into the first cross_linklist;
break;//
q=q->next;
p=p->next;
the implement of adding is just like what i writing above.
and the others are similar .you can do it by youself.
-
Correct answer: In the cross-linked list storage structure, you need a data field to store data, and two pointer fields to store row and column pointers, right and down, respectively. Each row of data in a linked list is linked to a circular linked list with a header node through the right pointer and its right number, and the data in each column is linked to the data below it with the header pointer through the down pointer.
Each node in the cross-linked list storage structure of a sparse matrix is at a crossroads.
-
Eliminate c
6a²+a+b²-16b-2=0
6a²+a+(b-8)²=66
6a²+a≤66
a≤3a=1,2,3
Test it one by one.
a=3,b-8=±3
i.e. a = 3, b = 11, c = 8b-3a = 61 or a = 3, b = 5, c = 13
The maximum value of abc is 3 11 61 = 2013
1.Legal status: The Red Cross Society of China is a national public fundraising society with independent legal personality, while the Red Cross Society of China is a national social assistance organization, and its staff is managed with reference to civil servants. >>>More
It's to show your reverence for the Red Cross!
TOC third, remember, you're not driving a stake, it's JJC, it's PVP! Ok, with this awareness, it's over!
Your current state of mind: it's getting worse and worse, feeling hopeless with him, and it's very bad. >>>More
Cross level 1 Collapse mountain level 1.
It's all the housekeeping skills of the frenzied battle. >>>More