小编Nar*_*rwe的帖子

子图枚举

什么是枚举父图的所有子图的有效算法.在我的特定情况下,父图是一个分子图,因此它将被连接,通常包含少于100个顶点.

编辑:我只对连接的子图感兴趣.

algorithm graph-algorithm

10
推荐指数
1
解决办法
2906
查看次数

释放NSMutableArray不会影响数组中元素的数量

有人可以向我解释以下结果吗?

//generate an array with 4 objects
NSMutableArray *array = [[NSMutableArray alloc] initWithObjects:
                         [NSNumber numberWithInt:1],
                         [NSNumber numberWithInt:2],
                         [NSNumber numberWithInt:3],
                         [NSNumber numberWithInt:4],
                         nil];
//release the array    
[array release];

//get a count of the number of elements in the array
int count = [array count]; <---  count returns 4
Run Code Online (Sandbox Code Playgroud)

我的计数不应该是零吗?'release'不会从数组中删除所有元素吗?

memory-management objective-c nsmutablearray

3
推荐指数
1
解决办法
39
查看次数