Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dvgb03
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Simon Sundberg
dvgb03
Commits
a7e8655f
Commit
a7e8655f
authored
3 weeks ago
by
Simon Sundberg
Browse files
Options
Downloads
Plain Diff
Merge branch 'lab3-gettersetter-fix' into 'master'
Fix set_edges() and add get_next_edge() See merge request
!13
parents
f1ec221a
b052dba8
Branches
master
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lab3-graph/adjlist.c
+5
-1
5 additions, 1 deletion
lab3-graph/adjlist.c
with
5 additions
and
1 deletion
lab3-graph/adjlist.c
+
5
−
1
View file @
a7e8655f
...
...
@@ -41,7 +41,7 @@ pedge get_edges(pnode G)
}
pnode
set_edges
(
pnode
G
,
pedge
E
)
{
if
(
is_empty
(
G
))
if
(
!
is_empty
(
G
))
G
->
edges
=
E
;
return
G
;
}
...
...
@@ -139,6 +139,10 @@ pedge set_weight(pedge E, double weight)
E
->
weight
=
weight
;
return
E
;
}
pedge
get_next_edge
(
pedge
E
)
{
return
edge_empty
(
E
)
?
NULL
:
E
->
next_edge
;
}
// edge_cons: connects two edges in edge list
pedge
edge_cons
(
pedge
first
,
pedge
second
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment