Skip to content

cirethic/go-lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cantor pair function in Go

1. cantor pair function

image

cantor pair function reference

https://en.wikipedia.org/wiki/Cantor_function

https://en.wikipedia.org/wiki/Pairing_function

https://gist.github.com/hannesl/8031402 



go run main.go

**func cantor_pair_calculate()**
33, 1  =>  596
6, 8  =>  113
596, 113  =>  251808

**func cantor_pair_reverse()**
251808 =>  596, 113
596 => 33, 1
113 => 6, 8

About

fun math - what could be done differently in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •