CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

Views: 418386
#(C) Graham Ellis, 2005-2006


#####################################################################
#####################################################################
DeclareCategory("IsHapSparseMat",IsObject);

DeclareRepresentation(	"IsHapSparseMatRep",
			IsComponentObjectRep,
			["rows",
			 "cols",
			  "characteristic",
			  "mat",
			]);

HapSparseMatFamily:=NewFamily(	"HapSparseMatFamily",
				IsHapSparseMat,
				IsHapSparseMat);

HapSparseMat:=NewType(HapSparseMatFamily,IsHapSparseMatRep);

InstallMethod( ViewObj,
"for HapSparseMat",
 [IsHapSparseMat],
 function(M)
 Print("Sparse matrix with ", M!.rows, " rows and ", M!.cols, " columns in characteristic ", M!.characteristic,"\n");
 end);

InstallMethod( PrintObj,
"for HapSparseMat",
 [IsHapSparseMat],
 function(M)
 Print("Sparse matrix with ", M!.rows, " rows and ", M!.cols, " columns in characteristic ", M!.characteristic,"\n");
 end);

#####################################################################
#####################################################################