@@ -325,5 +325,15 @@ sp :: Relation
325325sp = case relvarSP of { Right r -> r }
326326
327327
328+-- returns a relation with tupleCount tuples with a set of integer attributes attributesCount long
329+-- this is useful for performance and resource usage testing
330+matrixRelation :: Int -> Int -> Either RelationalError Relation
331+matrixRelation attributeCount tupleCount = mkRelation attributeSet tupleSet
332+ where
333+ attributeSet = M.fromList $ map (\c-> (show c, Attribute (show c) IntAtomType)) [0 .. attributeCount]
334+ tupleSet = HS.fromList $ mkRelationTuples attributeSet $ map (\c -> tuple c) [0 .. tupleCount]
335+ tuple tupleX = M.fromList $ map (\c -> (show c, IntAtom tupleX)) [0..attributeCount]
336+
337+
328338
329339