0.1.0 Dec 7, 2019

#30 in #calculus

AGPL-3.0

15KB
263 lines

Tense

This crate provides traits, struct, macro for n-rank tensor calculus. It can handle tensors such as scalars, vectors, matrices, etc.

assert_eq!(
	tense!(tense!(0, 1, 4), tense!(42, 12, 7), tense!(10, 20, -100))
		+ tense!(tense!(5, 2, 4), tense!(42, 12, 7), tense!(10, 20, -100))
		+ tense!(tense!(1000)),
	tense!(
		tense!(1005, 1003, 1008),
		tense!(1084, 1024, 1014),
		tense!(1020, 1040, 800)
	)
);

Dependencies

~3MB
~50K SLoC