March 2019
Intermediate to advanced
336 pages
9h 9m
English
A social network consists of social links that contain social entities such as people, friends, discussions, shares, beliefs, trust, and likes. This graph is used to represent the social network.
Metrics related to the proximity of entities can be calculated based on the graph. Social graphs consist of graph nodes and links, which are maps with a key name and multiple keys names, respectively:
///Main package has examples shown// in Go Data Structures and algorithms bookpackage main// importing fmt packageimport ( "fmt")type Name stringtype SocialGraph struct { GraphNodes map[Name]struct{} Links map[Name]map[Name]struct{}}
The different social network methods are explained and implemented in the next section. ...
Read now
Unlock full access