Network analysis of the COSMOS galaxy field