Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

DNA - FINAL #223

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
223 changes: 223 additions & 0 deletions DNA/DNA.xcodeproj/project.pbxproj
@@ -0,0 +1,223 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {

/* Begin PBXBuildFile section */
85F5BCE3164715C500915D77 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 85F5BCE2164715C500915D77 /* main.m */; };
85F5BCE5164715C500915D77 /* DNA.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = 85F5BCE4164715C500915D77 /* DNA.1 */; };
85F5BCED164716D700915D77 /* Cell.m in Sources */ = {isa = PBXBuildFile; fileRef = 85F5BCEC164716D700915D77 /* Cell.m */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
85F5BCDC164715C500915D77 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
85F5BCE5164715C500915D77 /* DNA.1 in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
85F5BCDE164715C500915D77 /* DNA */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = DNA; sourceTree = BUILT_PRODUCTS_DIR; };
85F5BCE2164715C500915D77 /* main.m */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
85F5BCE4164715C500915D77 /* DNA.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = DNA.1; sourceTree = "<group>"; };
85F5BCEB164716D700915D77 /* Cell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Cell.h; sourceTree = "<group>"; };
85F5BCEC164716D700915D77 /* Cell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Cell.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
85F5BCDB164715C500915D77 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
85F5BCD3164715C500915D77 = {
isa = PBXGroup;
children = (
85F5BCE1164715C500915D77 /* DNA */,
85F5BCDF164715C500915D77 /* Products */,
);
sourceTree = "<group>";
};
85F5BCDF164715C500915D77 /* Products */ = {
isa = PBXGroup;
children = (
85F5BCDE164715C500915D77 /* DNA */,
);
name = Products;
sourceTree = "<group>";
};
85F5BCE1164715C500915D77 /* DNA */ = {
isa = PBXGroup;
children = (
85F5BCE2164715C500915D77 /* main.m */,
85F5BCE4164715C500915D77 /* DNA.1 */,
85F5BCEB164716D700915D77 /* Cell.h */,
85F5BCEC164716D700915D77 /* Cell.m */,
);
path = DNA;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
85F5BCDD164715C500915D77 /* DNA */ = {
isa = PBXNativeTarget;
buildConfigurationList = 85F5BCE8164715C500915D77 /* Build configuration list for PBXNativeTarget "DNA" */;
buildPhases = (
85F5BCDA164715C500915D77 /* Sources */,
85F5BCDB164715C500915D77 /* Frameworks */,
85F5BCDC164715C500915D77 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = DNA;
productName = DNA;
productReference = 85F5BCDE164715C500915D77 /* DNA */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
85F5BCD5164715C500915D77 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0450;
ORGANIZATIONNAME = Kote;
};
buildConfigurationList = 85F5BCD8164715C500915D77 /* Build configuration list for PBXProject "DNA" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 85F5BCD3164715C500915D77;
productRefGroup = 85F5BCDF164715C500915D77 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
85F5BCDD164715C500915D77 /* DNA */,
);
};
/* End PBXProject section */

/* Begin PBXSourcesBuildPhase section */
85F5BCDA164715C500915D77 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
85F5BCE3164715C500915D77 /* main.m in Sources */,
85F5BCED164716D700915D77 /* Cell.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
85F5BCE6164715C500915D77 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
85F5BCE7164715C500915D77 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
SDKROOT = macosx;
};
name = Release;
};
85F5BCE9164715C500915D77 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
85F5BCEA164715C500915D77 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
85F5BCD8164715C500915D77 /* Build configuration list for PBXProject "DNA" */ = {
isa = XCConfigurationList;
buildConfigurations = (
85F5BCE6164715C500915D77 /* Debug */,
85F5BCE7164715C500915D77 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
85F5BCE8164715C500915D77 /* Build configuration list for PBXNativeTarget "DNA" */ = {
isa = XCConfigurationList;
buildConfigurations = (
85F5BCE9164715C500915D77 /* Debug */,
85F5BCEA164715C500915D77 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
/* End XCConfigurationList section */
};
rootObject = 85F5BCD5164715C500915D77 /* Project object */;
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "1.0">
</Bucket>
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0450"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "85F5BCDD164715C500915D77"
BuildableName = "DNA"
BlueprintName = "DNA"
ReferencedContainer = "container:DNA.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "85F5BCDD164715C500915D77"
BuildableName = "DNA"
BlueprintName = "DNA"
ReferencedContainer = "container:DNA.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "85F5BCDD164715C500915D77"
BuildableName = "DNA"
BlueprintName = "DNA"
ReferencedContainer = "container:DNA.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "85F5BCDD164715C500915D77"
BuildableName = "DNA"
BlueprintName = "DNA"
ReferencedContainer = "container:DNA.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>DNA.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>85F5BCDD164715C500915D77</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
18 changes: 18 additions & 0 deletions DNA/DNA/Cell.h
@@ -0,0 +1,18 @@

#import <Foundation/Foundation.h>

@interface Cell : NSObject
{
NSMutableArray *dna;
}

- (unsigned) hammingDistance: (Cell*) cell;

@end


@interface Cell (Mutator)

- (void) mutate: (unsigned) percentage;

@end