graphs + matrix